diff --git a/src/i_video.c b/src/i_video.c index 3da9359a4c..bb0d1f3f39 100644 --- a/src/i_video.c +++ b/src/i_video.c @@ -559,7 +559,7 @@ static void I_GetEvent(void) case SDL_TEXTINPUT: { ev.type = ev_textinput; - ev.data1 = Event->text.text[strlen(Event->text.text) - 1]; + ev.data1 = ((char *)SDL_iconv_utf8_ucs4(Event->text.text))[0]; D_PostEvent(&ev); break; }