version: avoid end up in endless loop if we compare 2 equal invalid versions

fixes issue with apk version -t asdf asdf
cute-signatures
Natanael Copa 2009-04-13 09:18:48 +00:00
parent 916c396c02
commit 355626171d
1 changed files with 1 additions and 1 deletions

View File

@ -143,7 +143,7 @@ int apk_version_compare(apk_blob_t a, apk_blob_t b)
int at = TOKEN_DIGIT, bt = TOKEN_DIGIT;
int av = 0, bv = 0;
while (at == bt && at != TOKEN_END && av == bv) {
while (at == bt && at != TOKEN_END && at != TOKEN_INVALID && av == bv) {
av = get_token(&at, &a);
bv = get_token(&bt, &b);
#if 0