]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/contrib/strutl.cc
do not strip epochs from state version strings
[apt.git] / apt-pkg / contrib / strutl.cc
index 5e641a02b23524396e68dfadf81eb2d0c3d3f266..d388cbda3a4dd6f7f62f7ec13f9db391a82f075d 100644 (file)
@@ -464,7 +464,9 @@ string SubstVar(const string &Str,const string &Subst,const string &Contents)
 
    if (OldPos >= Str.length())
       return Temp;
-   return Temp + string(Str,OldPos);
+
+   Temp.append(Str, OldPos, string::npos);
+   return Temp;
 }
 string SubstVar(string Str,const struct SubstVar *Vars)
 {
@@ -1215,7 +1217,7 @@ vector<string> StringSplit(std::string const &s, std::string const &sep,
    vector<string> split;
    size_t start, pos;
 
-   // no seperator given, this is bogus
+   // no separator given, this is bogus
    if(sep.size() == 0)
       return split;