SDL: fix SDL_SendEditingText when long composition text is enabled and strlen(text) == SDL_TEXTEDITINGEVENT_TEXT_SIZE (a0532)

From a053211a2a927070279136ff8b2dc54c1eb550e0 Mon Sep 17 00:00:00 2001
From: GNQG <[EMAIL REDACTED]>
Date: Tue, 18 Oct 2022 19:03:19 +0900
Subject: [PATCH] fix SDL_SendEditingText when long composition text is enabled
 and strlen(text) == SDL_TEXTEDITINGEVENT_TEXT_SIZE

(cherry-picked from commit 965ba1e09712fc57968d87c1cf60c541529fbd20)
---
 src/events/SDL_keyboard.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/events/SDL_keyboard.c b/src/events/SDL_keyboard.c
index f83191251c86..724dc243150c 100644
--- a/src/events/SDL_keyboard.c
+++ b/src/events/SDL_keyboard.c
@@ -947,7 +947,7 @@ SDL_SendEditingText(const char *text, int start, int length)
         SDL_utf8strlcpy(event.edit.text, text, SDL_arraysize(event.edit.text));
 
         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.windowID = keyboard->focus ? keyboard->focus->id : 0;
             event.editExt.text = text ? SDL_strdup(text) : NULL;