From fd0d339b6e40cafd1cb1f08c45a5f4201d9f2fa3 Mon Sep 17 00:00:00 2001 From: Nat Quayle Nelson Date: Sat, 8 Feb 2025 22:31:51 -0600 Subject: [PATCH] fix iter access --- src/game/boe.global.hpp | 2 +- src/scenario/scenario.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/game/boe.global.hpp b/src/game/boe.global.hpp index e9c7e24d2..554f6ea07 100644 --- a/src/game/boe.global.hpp +++ b/src/game/boe.global.hpp @@ -39,7 +39,7 @@ inline bool has_feature_flag(std::string flag) { inline std::string get_feature_flag(std::string flag) { std::map::const_iterator iter = feature_flags.find(flag); if(iter == feature_flags.end()) return ""; - return *iter; + return iter->second; } #endif diff --git a/src/scenario/scenario.cpp b/src/scenario/scenario.cpp index ef3c55d30..2e1ae2ea6 100644 --- a/src/scenario/scenario.cpp +++ b/src/scenario/scenario.cpp @@ -599,5 +599,5 @@ bool cScenario::has_feature_flag(std::string flag) { std::string cScenario::get_feature_flag(std::string flag) { std::map::const_iterator iter = this->feature_flags.find(flag); if(iter == this->feature_flags.end()) return ""; - return *iter; + return iter->second; } \ No newline at end of file