src/video/emscripten/SDL_emscriptenevents.c
changeset 9378 71743b696c06
parent 9377 4c29dc2baaa8
child 9591 ebc2a308211b
     1.1 --- a/src/video/emscripten/SDL_emscriptenevents.c	Fri Mar 06 21:26:37 2015 +0100
     1.2 +++ b/src/video/emscripten/SDL_emscriptenevents.c	Fri Mar 06 21:29:25 2015 +0100
     1.3 @@ -447,8 +447,9 @@
     1.4  Emscripten_HandleKeyPress(int eventType, const EmscriptenKeyboardEvent *keyEvent, void *userData)
     1.5  {
     1.6      char text[5];
     1.7 -    Emscripten_ConvertUTF32toUTF8(keyEvent->charCode, text);
     1.8 -    SDL_SendKeyboardText(text);
     1.9 +    if (Emscripten_ConvertUTF32toUTF8(keyEvent->charCode, text)) {
    1.10 +        SDL_SendKeyboardText(text);
    1.11 +    }
    1.12      return 1;
    1.13  }
    1.14