fix crash with non-en language

This commit is contained in:
MichaelDvP
2023-01-21 14:22:49 +01:00
parent d52c54d6fb
commit d735f397d8

View File

@@ -729,7 +729,7 @@ const char * Helpers::translated_word(const char * const * strings, const bool f
} }
// see how many translations we have for this entity. if there is no translation for this, revert to EN // see how many translations we have for this entity. if there is no translation for this, revert to EN
if (force_en || (Helpers::count_items(strings) >= language_index + 1 && strlen(strings[language_index]))) { if (!force_en && (Helpers::count_items(strings) >= language_index + 1 && strlen(strings[language_index]))) {
index = language_index; index = language_index;
} }
return strings[index]; return strings[index];