From e04c4cf2d6ec17c213067b3499b0a2ada7372d08 Mon Sep 17 00:00:00 2001 From: Michael Martin Date: Wed, 17 Aug 2022 19:08:54 -0700 Subject: [PATCH] Fix input of trans-ASCII Unicode characters under SDL2 --- sc2/src/libs/input/sdl/input.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sc2/src/libs/input/sdl/input.c b/sc2/src/libs/input/sdl/input.c index fabecd3e1..83ced418f 100644 --- a/sc2/src/libs/input/sdl/input.c +++ b/sc2/src/libs/input/sdl/input.c @@ -470,6 +470,7 @@ ProcessInputEvent (const SDL_Event *Event) while (Event->text.text[i]) { UniChar map_key = Event->text.text[i++]; + map_key &= 0xFF; /* Interpret as unsigned byte */ /* Decode any UTF-8 keys */ if (map_key >= 0xC0 && map_key < 0xE0)