wayland: Use SDL_memcpy instead of SDL_copyp to copy the repeated text string

SDL_copyp is not intended to copy arrays. Use SDL_memcpy with the explicit size instead.
This commit is contained in:
Frank Praznik
2025-05-21 20:36:44 -04:00
parent 22828d5f2a
commit abcfa1b7de

View File

@@ -353,7 +353,7 @@ static void keyboard_repeat_set(SDL_WaylandKeyboardRepeat *repeat_info, Uint32 k
repeat_info->next_repeat_ns = SDL_MS_TO_NS(repeat_info->repeat_delay_ms);
repeat_info->scancode = scancode;
if (has_text) {
SDL_copyp(repeat_info->text, text);
SDL_memcpy(repeat_info->text, text, sizeof(repeat_info->text));
} else {
repeat_info->text[0] = '\0';
}