- fixed macro substitution.

It was retrieving the macro from the wrong string.
This commit is contained in:
Christoph Oelckers 2019-03-04 17:31:11 +01:00
parent 614c23d4f2
commit 525b0214a7

View file

@ -354,7 +354,7 @@ void FStringTable::InsertString(int langid, FName label, const FString &string)
Printf("Bad macro in %s : %s\n", strlangid, label.GetChars()); Printf("Bad macro in %s : %s\n", strlangid, label.GetChars());
break; break;
} }
FString macroname(string.GetChars() + index + 2, endindex - index - 2); FString macroname(te.strings[0].GetChars() + index + 2, endindex - index - 2);
FStringf lookupstr("%s/%s", strlangid, macroname.GetChars()); FStringf lookupstr("%s/%s", strlangid, macroname.GetChars());
FStringf replacee("@[%s]", macroname.GetChars()); FStringf replacee("@[%s]", macroname.GetChars());
FName lookupname(lookupstr, true); FName lookupname(lookupstr, true);