summaryrefslogtreecommitdiff
path: root/lib/rpmvercmp.c
diff options
context:
space:
mode:
authorjbj <devnull@localhost>2003-01-10 20:34:26 +0000
committerjbj <devnull@localhost>2003-01-10 20:34:26 +0000
commitb91db5522ba698a9b4743f3049adcae562b5d445 (patch)
tree0a987b28621fdbf7f705064d82a411ff9b22cf0e /lib/rpmvercmp.c
parent24e18d4b3f38d7f7c2c4564b4026290fe7318e70 (diff)
downloadrpm-b91db5522ba698a9b4743f3049adcae562b5d445.tar.gz
rpm-b91db5522ba698a9b4743f3049adcae562b5d445.tar.bz2
rpm-b91db5522ba698a9b4743f3049adcae562b5d445.zip
- fix: obscure corner case(s) with rpmvercmp (#50977).
CVS patchset: 6004 CVS date: 2003/01/10 20:34:26
Diffstat (limited to 'lib/rpmvercmp.c')
-rw-r--r--lib/rpmvercmp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/rpmvercmp.c b/lib/rpmvercmp.c
index 5e6a1f985..d5772206b 100644
--- a/lib/rpmvercmp.c
+++ b/lib/rpmvercmp.c
@@ -67,7 +67,8 @@ int rpmvercmp(const char * a, const char * b)
/* take care of the case where the two version segments are */
/* different types: one numeric, the other alpha (i.e. empty) */
if (one == str1) return -1; /* arbitrary */
- if (two == str2) return -1;
+ /* XXX See patch #60884 (and details) from bugzilla #50977. */
+ if (two == str2) return (isnum ? 1 : -1);
if (isnum) {
/* this used to be done by converting the digit segments */