mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-11 07:12:16 +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
|
str = EnglishStrings->MatchString(oldStr);
|
||||||
const char *str;
|
|
||||||
str = EnglishStrings->MatchString (oldStr);
|
|
||||||
if (str != NULL)
|
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;
|
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:
|
donewithtext:
|
||||||
if (newStr)
|
if (newStr)
|
||||||
|
|
Loading…
Reference in a new issue