comctl32: Process GetKeyState return correctly (Coverity).

This commit is contained in:
Marcus Meissner 2014-04-06 20:23:56 +02:00 committed by Alexandre Julliard
parent a5602f1708
commit 318169a86f

View file

@ -3677,8 +3677,8 @@ static void LISTVIEW_SetSelection(LISTVIEW_INFO *infoPtr, INT nItem)
static BOOL LISTVIEW_KeySelection(LISTVIEW_INFO *infoPtr, INT nItem, BOOL space)
{
/* FIXME: pass in the state */
WORD wShift = HIWORD(GetKeyState(VK_SHIFT));
WORD wCtrl = HIWORD(GetKeyState(VK_CONTROL));
WORD wShift = GetKeyState(VK_SHIFT) & 0x8000;
WORD wCtrl = GetKeyState(VK_CONTROL) & 0x8000;
BOOL bResult = FALSE;
TRACE("nItem=%d, wShift=%d, wCtrl=%d\n", nItem, wShift, wCtrl);