summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-09-24 10:07:20 +0200
committerGitHub <noreply@github.com>2019-09-24 10:07:20 +0200
commitfd3c825034bb03f6705e1b9f6168604c8fb5732e (patch)
tree8ff6d399036fed6e64e9f7f7989111ea44f018af
parentdb47221b8c8491e21cdd0afdf3bc20bed5ce1618 (diff)
parentbbcf26b7bf396c3a23a8b81baa164453b685691b (diff)
Merge pull request #31970 from HaSa1002/i18n
Fixed out of range crash on remapping files for translation
-rw-r--r--editor/project_settings_editor.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/editor/project_settings_editor.cpp b/editor/project_settings_editor.cpp
index 91ce256be5..d42f15cce8 100644
--- a/editor/project_settings_editor.cpp
+++ b/editor/project_settings_editor.cpp
@@ -1309,7 +1309,7 @@ void ProjectSettingsEditor::_translation_res_option_changed() {
ERR_FAIL_COND(!remaps.has(key));
PoolStringArray r = remaps[key];
ERR_FAIL_INDEX(idx, r.size());
- if (translation_locales_idxs_remap.size() > 0) {
+ if (translation_locales_idxs_remap.size() > which) {
r.set(idx, path + ":" + langs[translation_locales_idxs_remap[which]]);
} else {
r.set(idx, path + ":" + langs[which]);