diff options
-rw-r--r-- | Source/kwsys/SystemTools.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx index e878185..c2ded8c 100644 --- a/Source/kwsys/SystemTools.cxx +++ b/Source/kwsys/SystemTools.cxx @@ -455,6 +455,11 @@ void SystemTools::ReplaceString(kwsys_stl::string& source, // perform replacements until done size_t replaceSize = strlen(replace); + // do while hangs if replaceSize is 0 + if(replaceSize == 0) + { + return; + } char *orig = strdup(src); char *currentPos = orig; searchPos = searchPos - src + orig; |