From 355626171daee1c5b57b078baf769946234c62a7 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Mon, 13 Apr 2009 09:18:48 +0000 Subject: version: avoid end up in endless loop if we compare 2 equal invalid versions fixes issue with apk version -t asdf asdf --- src/version.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/version.c') 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 -- cgit v1.2.3