mirror of
https://github.com/glfw/glfw.git
synced 2026-02-21 06:33:03 +01:00
Wayland: Fix partial writes of clipboard string
The string pointer used to write the contents of our clipboard data offer was never updated, causing it to repeat parts of the beginning of the string until the correct number of bytes had been written.
This commit is contained in:
@@ -1591,7 +1591,7 @@ static void dataSourceHandleSend(void* data,
|
||||
const char* mimeType,
|
||||
int fd)
|
||||
{
|
||||
const char* string = _glfw.wl.clipboardSendString;
|
||||
char* string = _glfw.wl.clipboardSendString;
|
||||
size_t len = strlen(string);
|
||||
int ret;
|
||||
|
||||
@@ -1631,6 +1631,7 @@ static void dataSourceHandleSend(void* data,
|
||||
return;
|
||||
}
|
||||
len -= ret;
|
||||
string += ret;
|
||||
}
|
||||
close(fd);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user