// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: versionmatch.cc,v 1.5 2001/05/29 03:07:12 jgg Exp $
+// $Id: versionmatch.cc,v 1.7 2002/11/06 06:43:14 jgg Exp $
/* ######################################################################
Version Matching
/* Break up the data string according to the selected type */
pkgVersionMatch::pkgVersionMatch(string Data,MatchType Type) : Type(Type)
{
+ MatchAll = false;
+ VerPrefixMatch = false;
+ RelVerPrefixMatch = false;
+
if (Type == None || Data.length() < 1)
return;
return;
}
- MatchAll = false;
-
// Are we a simple specification?
string::const_iterator I = Data.begin();
for (; I != Data.end() && *I != '='; I++);
else
RelArchive = Data;
- if (RelVerStr.end()[-1] == '*')
+ if (RelVerStr.length() > 0 && RelVerStr.end()[-1] == '*')
{
RelVerPrefixMatch = true;
RelVerStr = string(RelVerStr.begin(),RelVerStr.end()-1);