From 131699d30909118801d0855ee4daecc89e843aaa Mon Sep 17 00:00:00 2001 From: WerWolv Date: Mon, 20 Sep 2021 12:44:12 +0200 Subject: [PATCH] ui: Fixed language list crashing --- plugins/builtin/source/content/settings_entries.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/builtin/source/content/settings_entries.cpp b/plugins/builtin/source/content/settings_entries.cpp index ac3ad0ee0..9a2eefbaf 100644 --- a/plugins/builtin/source/content/settings_entries.cpp +++ b/plugins/builtin/source/content/settings_entries.cpp @@ -82,7 +82,9 @@ namespace hex::plugin::builtin { }(); static auto languageNames = [&]() { - std::vector result(languages.size()); + std::vector result; + result.reserve(languages.size()); + for (auto &[languageCode, languageName] : languages) result.push_back(languageName.c_str());