From 2646642664d94f48e1838f7d76c481100fad1aec Mon Sep 17 00:00:00 2001 From: Misa Date: Thu, 9 Jul 2020 02:58:16 -0700 Subject: [PATCH] Add braces to case 12 custom level loading I do this because we declare-and-initialize some variables in the case. This isn't strictly necessary, since there's no cross-initialization errors since it's the last case in the switch, but I'd just like to be future-proof. --- desktop_version/src/Map.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/desktop_version/src/Map.cpp b/desktop_version/src/Map.cpp index 4c04adb2..9f642002 100644 --- a/desktop_version/src/Map.cpp +++ b/desktop_version/src/Map.cpp @@ -1611,6 +1611,7 @@ void mapclass::loadlevel(int rx, int ry) #endif #if !defined(NO_CUSTOM_LEVELS) case 12: //Custom level + { const int curlevel = rx-100 + (ry-100) * ed.maxwidth; const edlevelclass* room_ptr = NULL; if (!INBOUNDS_ARR(curlevel, ed.level)) @@ -1818,6 +1819,7 @@ void mapclass::loadlevel(int rx, int ry) //do the appear/remove roomname here break; + } #endif } //The room's loaded: now we fill out damage blocks based on the tiles.