Don't crash trying to display stringtable-not-found error message (#588)

Günther Brammer 2011-03-14 21:04:27 +01:00
parent 2eb7a7c3e2
commit 2465c05afc
1 changed files with 2 additions and 2 deletions

View File

@ -73,7 +73,7 @@ void C4LangStringTable::PopulateStringTable() const
else if (*data == '\0' || *data == '\n' || *data == '\r')
{
if (!key.empty() && key[0]!='#')
LogF("%s: string table entry without a value: \"%s\"", GetFilePath()[0] ? GetFilePath() : "<unknown>", key.c_str());
LogF("%s: string table entry without a value: \"%s\"", GetFilePath() ? GetFilePath() : "<unknown>", key.c_str());
key.clear();
}
else
@ -142,7 +142,7 @@ void C4LangStringTable::ReplaceStrings(const StdStrBuf &rBuf, StdStrBuf &rTarget
}
catch (NoSuchTranslation &)
{
LogF("%s: string table entry not found: \"%s\"", GetFilePath()[0] ? GetFilePath() : "<unknown>", szStringName);
LogF("%s: string table entry not found: \"%s\"", GetFilePath() ? GetFilePath() : "<unknown>", szStringName);
}
}
// Alloc new Buffer