diff --git a/src/video/windows/SDL_windowskeyboard.c b/src/video/windows/SDL_windowskeyboard.c index 626e8763c..b9874a543 100644 --- a/src/video/windows/SDL_windowskeyboard.c +++ b/src/video/windows/SDL_windowskeyboard.c @@ -793,10 +793,10 @@ IME_GetCompositionString(SDL_VideoData *videodata, HIMC himc, DWORD string) videodata->ime_cursor = LOWORD(ImmGetCompositionStringW(himc, GCS_CURSORPOS, 0, 0)); if ((dwLang == LANG_CHT || dwLang == LANG_CHS) && videodata->ime_cursor > 0 && - videodata->ime_cursor < videodata->ime_composition_length / sizeof(WCHAR) && + videodata->ime_cursor < (int)(videodata->ime_composition_length / sizeof(WCHAR)) && (videodata->ime_composition[0] == 0x3000 || videodata->ime_composition[0] == 0x0020)) { // Traditional Chinese IMEs add a placeholder U+3000 - // Simplified Chinese IMEs seem to add a placholder U+0020 sometimes + // Simplified Chinese IMEs seem to add a placeholder U+0020 sometimes int i; for (i = videodata->ime_cursor + 1; i < length; ++i) videodata->ime_composition[i - 1] = videodata->ime_composition[i];