Commit 4e49b78a113432acf77274f5190dd456e1767be5

Sam Lantinga 2022-03-17T14:44:17

Fixed compile warning and comment typo

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
diff --git a/src/video/windows/SDL_windowskeyboard.c b/src/video/windows/SDL_windowskeyboard.c
index 626e876..b9874a5 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];