Skip to content

Commit

Permalink
fix crash with non-en language
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDvP committed Jan 21, 2023
1 parent d52c54d commit d735f39
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/helpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit d735f39

Please sign in to comment.