X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;ds=sidebyside;f=src%2Fmswin%2Ffg_main_mswin.c;h=6100ae12ca23f0aaea25c4b72a196ed88318821c;hb=80d83eb7ea1ae8d0907ec6deb5bb0de59580e707;hp=ad80055345147aa8555cdf4db5ef208d61a7945e;hpb=7094cf70ed46d1e6f0ef900b53c8af039933354e;p=freeglut diff --git a/src/mswin/fg_main_mswin.c b/src/mswin/fg_main_mswin.c index ad80055..6100ae1 100644 --- a/src/mswin/fg_main_mswin.c +++ b/src/mswin/fg_main_mswin.c @@ -296,7 +296,7 @@ static LRESULT fghWindowProcKeyPress(SFG_Window *window, UINT uMsg, GLboolean ke wParam=code[ 0 ]; INVOKE_WCB( *window, KeyboardUp, - ( (char)wParam, + ( (char)(wParam & 0xFF), /* and with 0xFF to indicate to runtime that we want to strip out higher bits - otherwise we get a runtime error when "Smaller Type Checks" is enabled */ window->State.MouseX, window->State.MouseY ) ); }