Don't include the null terminator in Wayland clipboard text

Fixes https://github.com/libsdl-org/SDL/issues/6083
This commit is contained in:
Sam Lantinga 2022-08-18 16:24:20 -07:00
parent f6b81125b3
commit 948dbe7d3f
1 changed files with 1 additions and 1 deletions

View File

@ -43,7 +43,7 @@ Wayland_SetClipboardText(_THIS, const char *text)
if (text[0] != '\0') { if (text[0] != '\0') {
SDL_WaylandDataSource* source = Wayland_data_source_create(_this); SDL_WaylandDataSource* source = Wayland_data_source_create(_this);
Wayland_data_source_add_data(source, TEXT_MIME, text, 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); status = Wayland_data_device_set_selection(data_device, source);
if (status != 0) { if (status != 0) {