Gerald Pfeifer : winex11: Make a constant unsigned to avoid shift overflow in get_locale_kbd_layout.

Alexandre Julliard julliard at wine.codeweavers.com
Wed Sep 2 10:23:16 CDT 2015


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

Author: Gerald Pfeifer <gerald at pfeifer.com>
Date:   Mon Aug 31 16:55:57 2015 +0200

winex11: Make a constant unsigned to avoid shift overflow in get_locale_kbd_layout.

---

 dlls/winex11.drv/keyboard.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/winex11.drv/keyboard.c b/dlls/winex11.drv/keyboard.c
index bd24961..3d68d66 100644
--- a/dlls/winex11.drv/keyboard.c
+++ b/dlls/winex11.drv/keyboard.c
@@ -1592,7 +1592,7 @@ static HKL get_locale_kbd_layout(void)
      */
     langid = PRIMARYLANGID(LANGIDFROMLCID(layout));
     if (langid == LANG_CHINESE || langid == LANG_JAPANESE || langid == LANG_KOREAN)
-        layout |= 0xe001 << 16; /* IME */
+        layout = MAKELONG( layout, 0xe001 ); /* IME */
     else
         layout |= layout << 16;
 




More information about the wine-cvs mailing list