diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2009-04-13 09:18:48 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2009-04-13 09:18:48 +0000 |
commit | 355626171daee1c5b57b078baf769946234c62a7 (patch) | |
tree | 81a5e44c8e9a45c89b1566a9dacf4ddb894c760e /src | |
parent | 916c396c0243695850a8117a748d89fa95e9605a (diff) | |
download | apk-tools-355626171daee1c5b57b078baf769946234c62a7.tar.gz apk-tools-355626171daee1c5b57b078baf769946234c62a7.tar.bz2 apk-tools-355626171daee1c5b57b078baf769946234c62a7.tar.xz apk-tools-355626171daee1c5b57b078baf769946234c62a7.zip |
version: avoid end up in endless loop if we compare 2 equal invalid versions
fixes issue with apk version -t asdf asdf
Diffstat (limited to 'src')
-rw-r--r-- | src/version.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/version.c b/src/version.c index 3d972fe..8594a93 100644 --- a/src/version.c +++ b/src/version.c @@ -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 |