Fix wrong context value being used for translation lookup

The trailing `]` was not being removed from the context anymore due to an off-by-one error introduced in #8430. Closes #8464.
This commit is contained in:
Robert Müller 2024-06-08 12:42:03 +02:00
parent fa58909dfe
commit f5de30ee88

View file

@ -210,7 +210,7 @@ bool CLocalizationDatabase::Load(const char *pFilename, IStorage *pStorage, ICon
log_error("localization", "malformed context '%s' on line %d", pLine, Line);
continue;
}
str_truncate(aContext, sizeof(aContext), pLine + 1, Len - 1);
str_truncate(aContext, sizeof(aContext), pLine + 1, Len - 2);
pLine = LineReader.Get();
if(!pLine)
{