mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 23:01:50 +00:00
- fixed: Dehacked text patching needs to alter all occurences of the source string.
This commit is contained in:
parent
867bfd2751
commit
6423b2fece
1 changed files with 12 additions and 11 deletions
|
@ -2190,23 +2190,24 @@ static int PatchText (int oldSize)
|
|||
}
|
||||
}
|
||||
|
||||
if (!good)
|
||||
// Search through most other texts
|
||||
const char *str;
|
||||
do
|
||||
{
|
||||
// Search through most other texts
|
||||
const char *str;
|
||||
str = EnglishStrings->MatchString (oldStr);
|
||||
str = EnglishStrings->MatchString(oldStr);
|
||||
if (str != NULL)
|
||||
{
|
||||
GStrings.SetString (str, newStr);
|
||||
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;
|
||||
}
|
||||
|
||||
if (!good)
|
||||
{
|
||||
DPrintf (" (Unmatched)\n");
|
||||
}
|
||||
}
|
||||
while (str != NULL); // repeat search until the text can no longer be found
|
||||
|
||||
if (!good)
|
||||
{
|
||||
DPrintf (" (Unmatched)\n");
|
||||
}
|
||||
|
||||
donewithtext:
|
||||
if (newStr)
|
||||
|
|
Loading…
Reference in a new issue