summaryrefslogtreecommitdiff
path: root/src/version.c
diff options
context:
space:
mode:
authorTimo Teras <timo.teras@iki.fi>2009-11-05 17:49:12 +0200
committerTimo Teras <timo.teras@iki.fi>2009-11-05 17:49:12 +0200
commit44ac0b06af20bd32010502a10d8bb7752215c627 (patch)
treead00e5b645075914a9301a9a978147059c09a60b /src/version.c
parenta7360395ea963334e80fb49d3fc36789d6f40685 (diff)
downloadapk-tools-44ac0b06af20bd32010502a10d8bb7752215c627.tar.gz
apk-tools-44ac0b06af20bd32010502a10d8bb7752215c627.tar.bz2
apk-tools-44ac0b06af20bd32010502a10d8bb7752215c627.tar.xz
apk-tools-44ac0b06af20bd32010502a10d8bb7752215c627.zip
version: fix comparison of version again
-t 1.3-r0 1.3.1-r0 was broke
Diffstat (limited to 'src/version.c')
-rw-r--r--src/version.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/version.c b/src/version.c
index 4253042..890ec7e 100644
--- a/src/version.c
+++ b/src/version.c
@@ -218,9 +218,9 @@ int apk_version_compare_blob(apk_blob_t a, apk_blob_t b)
return APK_VERSION_LESS;
if (bt == TOKEN_SUFFIX && get_token(&bt, &b) < 0)
return APK_VERSION_GREATER;
- if (at == TOKEN_END)
+ if (at > bt)
return APK_VERSION_LESS;
- if (bt == TOKEN_END)
+ if (bt > at)
return APK_VERSION_GREATER;
return APK_VERSION_EQUAL;