From 8f3ddd0d13646f4563ed587c21e4282b1281f84f Mon Sep 17 00:00:00 2001 From: havoc Date: Mon, 2 Feb 2004 14:41:20 +0000 Subject: [PATCH] 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 --- vid_wgl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.39.2