Fixed a serious bug in replace_all() that could make replaces fail or corrupt random data

This commit is contained in:
David Anderson
2006-09-10 07:23:08 +00:00
parent 4bd356079c
commit 3754604686
2 changed files with 13 additions and 1 deletions

View File

@ -227,7 +227,7 @@ stock replace_all(string[], len, what[], with[])
while (replace(string[charnum], len, what, with) != 0)
{
charnum += contain(string[charnum], with) + withlen;
charnum += contain(string[charnum], what) + withlen;
total++;
}