Merge commit '965ba1e09712fc57968d87c1cf60c541529fbd20' into main

This commit is contained in:
Sam Lantinga 2022-10-18 09:21:51 -07:00
commit 764e7c4f4b
1 changed files with 1 additions and 1 deletions

View File

@ -1058,7 +1058,7 @@ SDL_SendEditingText(const char *text, int start, int length)
SDL_utf8strlcpy(event.edit.text, text, SDL_arraysize(event.edit.text)); SDL_utf8strlcpy(event.edit.text, text, SDL_arraysize(event.edit.text));
if (SDL_GetHintBoolean(SDL_HINT_IME_SUPPORT_EXTENDED_TEXT, SDL_FALSE) && if (SDL_GetHintBoolean(SDL_HINT_IME_SUPPORT_EXTENDED_TEXT, SDL_FALSE) &&
SDL_strlen(text) > SDL_arraysize(event.text.text)) { SDL_strlen(text) >= SDL_arraysize(event.text.text)) {
event.editExt.type = SDL_TEXTEDITING_EXT; event.editExt.type = SDL_TEXTEDITING_EXT;
event.editExt.windowID = keyboard->focus ? keyboard->focus->id : 0; event.editExt.windowID = keyboard->focus ? keyboard->focus->id : 0;
event.editExt.text = text ? SDL_strdup(text) : NULL; event.editExt.text = text ? SDL_strdup(text) : NULL;