Commit 01a028cc authored by Natanael Copa's avatar Natanael Copa

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.
parent d9879b72
...@@ -33,7 +33,8 @@ static void next_token(int *type, apk_blob_t *blob) ...@@ -33,7 +33,8 @@ static void next_token(int *type, apk_blob_t *blob)
if (blob->len == 0 || blob->ptr[0] == 0) { if (blob->len == 0 || blob->ptr[0] == 0) {
n = TOKEN_END; 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; n = TOKEN_LETTER;
} else if (*type == TOKEN_SUFFIX && isdigit(blob->ptr[0])) { } else if (*type == TOKEN_SUFFIX && isdigit(blob->ptr[0])) {
n = TOKEN_SUFFIX_NO; n = TOKEN_SUFFIX_NO;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment