diff --git a/MissionEditor/functions.cpp b/MissionEditor/functions.cpp index 7a0fe25..ca6c5b9 100644 --- a/MissionEditor/functions.cpp +++ b/MissionEditor/functions.cpp @@ -1308,12 +1308,13 @@ CString GetFreeID() "Actions", "AITriggerTypes", }; - auto const found = find(std::begin(typeListSections), std::end(typeListSections), [&ini, input](auto const& key) { - return ini.GetSection(key).HasValue(input); - }); - if (found != std::end(typeListSections)) { + if (find(std::begin(typeListSections), std::end(typeListSections), input) != std::end(typeListSections)) { return true; } + if (find(std::begin(idListSections), std::end(idListSections), input) != std::end(idListSections)) { + return true; + } + return false; }; for (;;) {