mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 08:19:52 +03:00
fix crash with non-en language
This commit is contained in:
@@ -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
|
||||
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;
|
||||
}
|
||||
return strings[index];
|
||||
|
||||
Reference in New Issue
Block a user