From 1440419b45dec876497b982f945bcfff8d0aea4b Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Sat, 24 Dec 2005 23:32:59 +0000 Subject: [PATCH] * GCC 2.95 compatibility. --- src/libstore/store.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libstore/store.cc b/src/libstore/store.cc index dc3625a1d..2ab52301f 100644 --- a/src/libstore/store.cc +++ b/src/libstore/store.cc @@ -301,7 +301,7 @@ static string addPrefix(const string & prefix, const string & s) static string stripPrefix(const string & prefix, const string & s) { if (s.size() <= prefix.size() || - s.compare(0, prefix.size(), prefix) != 0 || + string(s, 0, prefix.size()) != prefix || s[prefix.size()] != 0) throw Error(format("string `%1%' is missing prefix `%2%'") % s % prefix);