Marcus Meissner : comctl32: Process GetKeyState return correctly (Coverity ).

Alexandre Julliard julliard at winehq.org
Tue Apr 8 14:02:50 CDT 2014


Module: wine
Branch: master
Commit: 318169a86ff58e29f9b076dafb149abf794bb1c2
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=318169a86ff58e29f9b076dafb149abf794bb1c2

Author: Marcus Meissner <marcus at jet.franken.de>
Date:   Sun Apr  6 20:23:56 2014 +0200

comctl32: Process GetKeyState return correctly (Coverity).

---

 dlls/comctl32/listview.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c
index bc9a04c..c5b5670 100644
--- a/dlls/comctl32/listview.c
+++ b/dlls/comctl32/listview.c
@@ -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);




More information about the wine-cvs mailing list