From: havoc Date: Mon, 2 Feb 2004 14:41:20 +0000 (+0000) Subject: cast the char array to unsigned short in the ToAscii call, because windows is insane... X-Git-Tag: xonotic-v0.1.0preview~6127 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=8f3ddd0d13646f4563ed587c21e4282b1281f84f;p=xonotic%2Fdarkplaces.git cast the char array to unsigned short in the ToAscii call, because windows is insane enough to make it take an unsigned short *, even though it writes byte chars to it git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@3861 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/vid_wgl.c b/vid_wgl.c index fa20f90f..194c0da8 100644 --- 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;