diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2009-04-13 08:37:25 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2009-04-13 08:37:25 +0000 |
commit | 01a028cc2fa9fd52a9b17c24f9294ee980d6df85 (patch) | |
tree | f7be9c2f91bdabec6d149168228c791a1d50f73f | |
parent | d9879b72d520178201c80e337b5abb99f8dfb3f4 (diff) | |
download | apk-tools-01a028cc2fa9fd52a9b17c24f9294ee980d6df85.tar.gz apk-tools-01a028cc2fa9fd52a9b17c24f9294ee980d6df85.tar.bz2 apk-tools-01a028cc2fa9fd52a9b17c24f9294ee980d6df85.tar.xz apk-tools-01a028cc2fa9fd52a9b17c24f9294ee980d6df85.zip |
version: allow token letter after digit_or_zero
Otherwise we only allow letters after first digit, i.e 2a, 2b but not
2.2a, 2.2b etc.
-rw-r--r-- | src/version.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/version.c b/src/version.c index 8a21cee..1f8b610 100644 --- a/src/version.c +++ b/src/version.c @@ -33,7 +33,8 @@ static void next_token(int *type, apk_blob_t *blob) if (blob->len == 0 || blob->ptr[0] == 0) { n = TOKEN_END; - } else if (*type == TOKEN_DIGIT && islower(blob->ptr[0])) { + } else if ((*type == TOKEN_DIGIT || *type == TOKEN_DIGIT_OR_ZERO) && + islower(blob->ptr[0])) { n = TOKEN_LETTER; } else if (*type == TOKEN_SUFFIX && isdigit(blob->ptr[0])) { n = TOKEN_SUFFIX_NO; |