- better validation checks for CSV-based string files.

This commit is contained in:
Christoph Oelckers 2019-12-15 16:42:24 +01:00
parent e0fb9a45e2
commit 71d7013255

View file

@ -193,7 +193,8 @@ bool FStringTable::readMacros(int lumpnum)
bool FStringTable::ParseLanguageCSV(int lumpnum, const TArray<uint8_t> &buffer)
{
if (memcmp(buffer.Data(), "default,", 8)) return false;
if (buffer.Size() < 11) return false;
if (strnicmp(buffer.Data(), "default,", 8) && strnicmp(buffer.Data(), "identifier,", 11 ) return false;
auto data = parseCSV(buffer);
int labelcol = -1;