diff options
Diffstat (limited to 'src/libstore/store.cc')
-rw-r--r-- | src/libstore/store.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstore/store.cc b/src/libstore/store.cc index dc3625a1d5da..2ab52301fb57 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); |