BUG: fix for bug 0005767 hang for replace string with empty
This commit is contained in:
parent
48762a51dd
commit
22fca8aa12
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue