From b8db36af3fac567665370b3d493f63deb2acc843 Mon Sep 17 00:00:00 2001 From: JoshuaMKW Date: Mon, 8 Jul 2024 19:30:36 -0500 Subject: [PATCH] Fix oversight that caused Sirena to crash when past first shine --- include/BetterSMS/area.hxx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/BetterSMS/area.hxx b/include/BetterSMS/area.hxx index 1cac24f..3d34997 100644 --- a/include/BetterSMS/area.hxx +++ b/include/BetterSMS/area.hxx @@ -37,11 +37,21 @@ namespace BetterSMS { } void addScenario(s32 scenarioID, s32 scenarioNameID) { + for (const s32 &id : mScenarioIDs) { + if (id == scenarioID) { + return; + } + } mScenarioIDs.push_back(scenarioID); mScenarioNameIDs.push_back(scenarioNameID); } void addExScenario(s32 exScenarioID, s32 exScenarioNameID) { + for (const s32 &id : mScenarioIDs) { + if (id == exScenarioID) { + return; + } + } mExScenarioIDs.push_back(exScenarioID); mExScenarioNameIDs.push_back(exScenarioNameID); }