From 01a028cc2fa9fd52a9b17c24f9294ee980d6df85 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Mon, 13 Apr 2009 08:37:25 +0000 Subject: 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. --- src/version.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') 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; -- cgit v1.2.3-70-g09d2