From d434941724b49021cacc678271128ed7d74825b8 Mon Sep 17 00:00:00 2001 From: Ralphie Morell Date: Thu, 6 Apr 2023 23:09:25 -0400 Subject: [PATCH] Fix: Gameplay Stats OOB (#2673) * Handle `sceneMapping` OOB behavior * whoops * More solid definition of upper bound --- soh/soh/Enhancements/gameplaystats.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/soh/soh/Enhancements/gameplaystats.cpp b/soh/soh/Enhancements/gameplaystats.cpp index 50583b554..011183609 100644 --- a/soh/soh/Enhancements/gameplaystats.cpp +++ b/soh/soh/Enhancements/gameplaystats.cpp @@ -251,8 +251,10 @@ std::string ResolveSceneID(int sceneID, int roomID){ } else if (sceneID == SCENE_HAKASITARELAY) { //Only the last room of Dampe's Grave (rm 6) is considered the windmill scene = roomID == 6 ? "Windmill" : "Dampe's Grave"; - } else { + } else if (sceneID < SCENE_ID_MAX) { scene = sceneMappings[sceneID]; + } else { + scene = "???"; } return scene; }