From 948dbe7d3f8a393e49010038f0c6cac089ac2599 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Thu, 18 Aug 2022 16:24:20 -0700 Subject: [PATCH] Don't include the null terminator in Wayland clipboard text Fixes https://github.com/libsdl-org/SDL/issues/6083 --- src/video/wayland/SDL_waylandclipboard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/video/wayland/SDL_waylandclipboard.c b/src/video/wayland/SDL_waylandclipboard.c index e6315540e..ede016c79 100644 --- a/src/video/wayland/SDL_waylandclipboard.c +++ b/src/video/wayland/SDL_waylandclipboard.c @@ -43,7 +43,7 @@ Wayland_SetClipboardText(_THIS, const char *text) if (text[0] != '\0') { SDL_WaylandDataSource* source = Wayland_data_source_create(_this); Wayland_data_source_add_data(source, TEXT_MIME, text, - SDL_strlen(text) + 1); + SDL_strlen(text)); status = Wayland_data_device_set_selection(data_device, source); if (status != 0) {