]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/versionmatch.cc
parse correctly the Hold: lines into Pkg->SelectedState = Hold
[apt.git] / apt-pkg / versionmatch.cc
index 17a54bc4c5a3dd9582cafe28c2d64fde8d161860..c40b1fdbc859b0875192ac79ca55a3d461fc6e43 100644 (file)
@@ -118,7 +118,7 @@ pkgVersionMatch::pkgVersionMatch(string Data,MatchType Type) : Type(Type)
    
    if (Type == Origin)
    {
    
    if (Type == Origin)
    {
-      if (Data[0] == '"' && Data.end()[-1] == '"')
+      if (Data[0] == '"' && Data.length() >= 2 && Data.end()[-1] == '"')
         OrSite = Data.substr(1, Data.length() - 2);
       else
         OrSite = Data;
         OrSite = Data.substr(1, Data.length() - 2);
       else
         OrSite = Data;