Fix pasting text from Blender in GHOST/Wayland

The nil terminator character shouldn't be included, causing an extra
character to be added in some cases.
This commit is contained in:
Campbell Barton 2022-05-28 16:06:54 +10:00
parent 5dfff02437
commit 16166f69be
1 changed files with 1 additions and 1 deletions

View File

@ -522,7 +522,7 @@ static void data_source_send(void *data,
int32_t fd)
{
const char *const buffer = static_cast<char *>(data);
if (write(fd, buffer, strlen(buffer) + 1) < 0) {
if (write(fd, buffer, strlen(buffer)) < 0) {
GHOST_PRINT("error writing to clipboard: " << std::strerror(errno) << std::endl);
}
close(fd);