From: terencehill Date: Mon, 18 Feb 2019 23:51:00 +0000 (+0100) Subject: Add brackets to GAMETYPE macros X-Git-Tag: xonotic-v0.8.5~1598 X-Git-Url: http://de.git.xonotic.org/?a=commitdiff_plain;h=5b3f1f541e9a2225632d0cf1de2be88c5665fdcd;p=xonotic%2Fxonotic-data.pk3dir.git Add brackets to GAMETYPE macros --- diff --git a/qcsrc/menu/xonotic/util.qc b/qcsrc/menu/xonotic/util.qc index 734056412..57d084e4a 100644 --- a/qcsrc/menu/xonotic/util.qc +++ b/qcsrc/menu/xonotic/util.qc @@ -702,7 +702,7 @@ float updateCompression() Gametype GameType_GetID(int cnt) { int i = 0; - #define GAMETYPE(it) if (i++ == cnt) return it; + #define GAMETYPE(it) { if (i++ == cnt) return it; } GAMETYPES HIDDEN_GAMETYPES #undef GAMETYPE @@ -716,7 +716,7 @@ int GameType_GetCount() #define GAMETYPE(id) ++i; GAMETYPES #undef GAMETYPE - #define GAMETYPE(it) if (dev) ++i; + #define GAMETYPE(it) { if (dev) ++i; } HIDDEN_GAMETYPES #undef GAMETYPE return i;