mirror of https://github.com/encounter/SDL.git
Fixed compile warning and comment typo
This commit is contained in:
parent
0bf8ccfb60
commit
4e49b78a11
|
@ -793,10 +793,10 @@ IME_GetCompositionString(SDL_VideoData *videodata, HIMC himc, DWORD string)
|
||||||
videodata->ime_cursor = LOWORD(ImmGetCompositionStringW(himc, GCS_CURSORPOS, 0, 0));
|
videodata->ime_cursor = LOWORD(ImmGetCompositionStringW(himc, GCS_CURSORPOS, 0, 0));
|
||||||
if ((dwLang == LANG_CHT || dwLang == LANG_CHS) &&
|
if ((dwLang == LANG_CHT || dwLang == LANG_CHS) &&
|
||||||
videodata->ime_cursor > 0 &&
|
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)) {
|
(videodata->ime_composition[0] == 0x3000 || videodata->ime_composition[0] == 0x0020)) {
|
||||||
// Traditional Chinese IMEs add a placeholder U+3000
|
// 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;
|
int i;
|
||||||
for (i = videodata->ime_cursor + 1; i < length; ++i)
|
for (i = videodata->ime_cursor + 1; i < length; ++i)
|
||||||
videodata->ime_composition[i - 1] = videodata->ime_composition[i];
|
videodata->ime_composition[i - 1] = videodata->ime_composition[i];
|
||||||
|
|
Loading…
Reference in New Issue