From 5f2d41884c6ab643252aa06fd1d45fe02dce7887 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 13 Apr 2019 13:58:37 +0200 Subject: [PATCH] - make sure that the global and default language tables are always separate, if some other tables is being attempted to be filled in along with them, these tables should be ignored. --- src/gamedata/stringtable.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gamedata/stringtable.cpp b/src/gamedata/stringtable.cpp index 2e249a0f9..ea8fa074b 100644 --- a/src/gamedata/stringtable.cpp +++ b/src/gamedata/stringtable.cpp @@ -293,10 +293,12 @@ void FStringTable::LoadLanguage (const TArray &buffer) } if (len == 1 && sc.String[0] == '*') { + activeMaps.Clear(); activeMaps.Push(global_table); } else if (len == 7 && stricmp (sc.String, "default") == 0) { + activeMaps.Clear(); activeMaps.Push(default_table); } else @@ -307,7 +309,8 @@ void FStringTable::LoadLanguage (const TArray &buffer) } else { - activeMaps.Push(MAKE_ID(tolower(sc.String[0]), tolower(sc.String[1]), tolower(sc.String[2]), 0)); + if (activeMaps.Size() != 1 || (activeMaps[0] != default_table && activeMaps[0] != global_table)) + activeMaps.Push(MAKE_ID(tolower(sc.String[0]), tolower(sc.String[1]), tolower(sc.String[2]), 0)); } sc.MustGetString (); } while (!sc.Compare ("]"));