diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx index 0b887fc2f..6b1327c59 100644 --- a/Source/kwsys/SystemTools.cxx +++ b/Source/kwsys/SystemTools.cxx @@ -268,7 +268,7 @@ void SystemTools::ReplaceString(kwsys_std::string& source, searchPos = searchPos - src + orig; // initialize the result - source.clear(); + source.erase(source.begin(),source.end()); do { *searchPos = '\0';