From 2b84520e89aef0b0efe4a4ef7562e8e16aacfcd2 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sat, 5 Oct 2013 21:49:58 -0400 Subject: [PATCH] Fix precedence of operations in a boolean expression in function UpdateMenus in WndMainWindow.cpp. Bitwise OR has higher precedence than the ternary expression operators. This is likely unintended, since the main goal here is to either check or un-check the items. --- Windows/WndMainWindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Windows/WndMainWindow.cpp b/Windows/WndMainWindow.cpp index ce15b09168..5c1b7c6cae 100644 --- a/Windows/WndMainWindow.cpp +++ b/Windows/WndMainWindow.cpp @@ -1741,7 +1741,7 @@ namespace MainWindow g_Config.iCurrentStateSlot = SaveState::SAVESTATESLOTS - 1; for (int i = 0; i < ARRAY_SIZE(savestateSlot); i++) { - CheckMenuItem(menu, savestateSlot[i], MF_BYCOMMAND | ( i == g_Config.iCurrentStateSlot )? MF_CHECKED : MF_UNCHECKED); + CheckMenuItem(menu, savestateSlot[i], MF_BYCOMMAND | (( i == g_Config.iCurrentStateSlot )? MF_CHECKED : MF_UNCHECKED)); } UpdateCommands();