- fixed: Dehacked text patching needs to alter all occurences of the source string.

This commit is contained in:
Christoph Oelckers 2015-02-09 10:15:11 +01:00
parent 867bfd2751
commit 6423b2fece
1 changed files with 12 additions and 11 deletions

View File

@ -2190,23 +2190,24 @@ static int PatchText (int oldSize)
}
}
if (!good)
{
// Search through most other texts
const char *str;
do
{
str = EnglishStrings->MatchString(oldStr);
if (str != NULL)
{
GStrings.SetString(str, newStr);
EnglishStrings->SetString(str, "~~"); // set to something invalid so that it won't get found again by the next iteration or by another replacement later
good = true;
}
}
while (str != NULL); // repeat search until the text can no longer be found
if (!good)
{
DPrintf (" (Unmatched)\n");
}
}
donewithtext:
if (newStr)