Skip to content
Permalink
Browse files

- make sure that the global and default language tables are always se…

…parate, if some other tables is being attempted to be filled in along with them, these tables should be ignored.
  • Loading branch information...
coelckers committed Apr 13, 2019
1 parent d73f8fa commit 5f2d41884c6ab643252aa06fd1d45fe02dce7887
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/gamedata/stringtable.cpp
@@ -293,10 +293,12 @@ void FStringTable::LoadLanguage (const TArray<uint8_t> &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<uint8_t> &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 ("]"));

0 comments on commit 5f2d418

Please sign in to comment.
You can’t perform that action at this time.