Permalink
Browse files

Order of operations:

(forceClose ? 0x01 : 0 | enableSound ? 0x02 : 0);
is actually (forceClose ? 0x01 : (0 | enableSound) ? 0x02 : 0);
  • Loading branch information...
1 parent 2b69b92 commit c7083e3738382b636557b924ad4b233353a6849a Mike committed Jul 25, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 xbmc/ApplicationMessenger.cpp
@@ -1136,7 +1136,7 @@ void CApplicationMessenger::Show(CGUIDialog *pDialog)
void CApplicationMessenger::Close(CGUIWindow *window, bool forceClose, bool waitResult /*= true*/, int nextWindowID /*= 0*/, bool enableSound /*= true*/)
{
ThreadMessage tMsg = {TMSG_GUI_WINDOW_CLOSE, nextWindowID};
- tMsg.dwParam2 = (DWORD)(forceClose ? 0x01 : 0 | enableSound ? 0x02 : 0);
+ tMsg.dwParam2 = (DWORD)((forceClose ? 0x01 : 0) | (enableSound ? 0x02 : 0));
tMsg.lpVoid = window;
SendMessage(tMsg, waitResult);
}

0 comments on commit c7083e3

Please sign in to comment.