From 4e49b78a113432acf77274f5190dd456e1767be5 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Thu, 17 Mar 2022 14:44:17 -0700 Subject: [PATCH] Fixed compile warning and comment typo --- src/video/windows/SDL_windowskeyboard.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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];