]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
cast the char array to unsigned short in the ToAscii call, because windows is insane...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 2 Feb 2004 14:41:20 +0000 (14:41 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 2 Feb 2004 14:41:20 +0000 (14:41 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@3861 d7cf8633-e32d-0410-b094-e92efae38249

vid_wgl.c

index fa20f90f99366b9dde4ed0bedf76fe04f309dbc2..194c0da8f5daeeead4e864c69c61bca1c97511cb 100644 (file)
--- a/vid_wgl.c
+++ b/vid_wgl.c
@@ -548,7 +548,7 @@ LONG WINAPI MainWndProc (HWND hWnd, UINT uMsg, WPARAM  wParam, LPARAM lParam)
                        GetKeyboardState (state);
                        // alt/ctrl/shift tend to produce funky ToAscii values,
                        // and if it's not a single character we don't know care about it
-                       if (vkey == K_ALT || vkey == K_CTRL || vkey == K_SHIFT || ToAscii (wParam, lParam >> 16, state, asciichar, 0) != 1)
+                       if (vkey == K_ALT || vkey == K_CTRL || vkey == K_SHIFT || ToAscii (wParam, lParam >> 16, state, (unsigned short *)asciichar, 0) != 1)
                                asciichar[0] = 0;
                        Key_Event (vkey, asciichar[0], down);
                        break;