diff options
author | Arch Librarian <arch@canonical.com> | 2004-09-20 16:51:45 +0000 |
---|---|---|
committer | Arch Librarian <arch@canonical.com> | 2004-09-20 16:51:45 +0000 |
commit | 6a19558e1ef1c3ac6aff4af435c9d13a3405ca08 (patch) | |
tree | 02a1099bb91a455e0beb34e786e14bc5d1e035ba /apt-pkg/version.cc | |
parent | 52e7839aec2f1e1f54dcffbe76836b3ad17c8784 (diff) |
Fixed versioning bug
Author: jgg
Date: 1998-11-28 20:50:24 GMT
Fixed versioning bug
Diffstat (limited to 'apt-pkg/version.cc')
-rw-r--r-- | apt-pkg/version.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/apt-pkg/version.cc b/apt-pkg/version.cc index cdfad3fd7..4e2e61312 100644 --- a/apt-pkg/version.cc +++ b/apt-pkg/version.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: version.cc,v 1.6 1998/11/26 23:29:42 jgg Exp $ +// $Id: version.cc,v 1.7 1998/11/28 20:50:24 jgg Exp $ /* ###################################################################### Version - Version string @@ -59,6 +59,7 @@ int pkgVersionCompare(string A,string B) static int iVersionCompare(const char *A, const char *AEnd, const char *B, const char *BEnd) { + // cout << string(A,AEnd) << ',' << string(B,BEnd) << endl; if (A >= AEnd && B >= BEnd) return 0; if (A >= AEnd) @@ -180,6 +181,11 @@ int pkgVersionCompare(const char *A, const char *AEnd, const char *B, const char *drhs = BEnd-1; for (;dlhs > lhs && *dlhs != '-'; dlhs--); for (;drhs > rhs && *drhs != '-'; drhs--); + + if (dlhs == A) + dlhs = AEnd; + if (drhs == B) + drhs = BEnd; // Compare the main version Res = iVersionCompare(lhs,dlhs,rhs,drhs); @@ -243,4 +249,3 @@ bool pkgCheckDep(const char *DepVer,const char *PkgVer,int Op) return false; } /*}}}*/ - |