summaryrefslogtreecommitdiff
path: root/src/version.c
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-04-13 08:37:25 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-04-13 08:37:25 +0000
commit01a028cc2fa9fd52a9b17c24f9294ee980d6df85 (patch)
treef7be9c2f91bdabec6d149168228c791a1d50f73f /src/version.c
parentd9879b72d520178201c80e337b5abb99f8dfb3f4 (diff)
downloadapk-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.
Diffstat (limited to 'src/version.c')
-rw-r--r--src/version.c3
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;