Skip to content

Commit abcfa1b

Browse files
committed
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.
1 parent 22828d5 commit abcfa1b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/video/wayland/SDL_waylandevents.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ static void keyboard_repeat_set(SDL_WaylandKeyboardRepeat *repeat_info, Uint32 k
353353
repeat_info->next_repeat_ns = SDL_MS_TO_NS(repeat_info->repeat_delay_ms);
354354
repeat_info->scancode = scancode;
355355
if (has_text) {
356-
SDL_copyp(repeat_info->text, text);
356+
SDL_memcpy(repeat_info->text, text, sizeof(repeat_info->text));
357357
} else {
358358
repeat_info->text[0] = '\0';
359359
}

0 commit comments

Comments
 (0)