DEADSOFTWARE

FlexUI: button control; slightly changed event consuming logic
[d2df-sdl.git] / src / game / g_window.pas
index 12a038f68950f620a4c804e6d7d7078b65b60946..1db0c639efbfe27713abca1491ad2723fc4de1d5 100644 (file)
@@ -431,7 +431,7 @@ begin
         Utf8ToUnicode(@uc, PChar(ev.text.text), 1);
         keychr := Word(uc);
         if (keychr > 127) then keychr := Word(wchar2win(WideChar(keychr)));
-        CharPress(AnsiChar(keychr));
+        if (keychr > 0) and (keychr <= 255) then CharPress(AnsiChar(keychr));
       end;
 
     // other key presses and joysticks are handled in e_input