diff --git a/README.md b/README.md index d406c878..4231914f 100644 --- a/README.md +++ b/README.md @@ -132,6 +132,7 @@ information on what to include when reporting a bug. - [Wayland] Bugfix: `glfwSetClipboardString` would fail if set to result of `glfwGetClipboardString` - [Wayland] Bugfix: Data source creation error would cause double free at termination + - [Wayland] Bugfix: Partial writes of clipboard string would cause beginning to repeat ## Contact diff --git a/src/wl_window.c b/src/wl_window.c index ee4a26f6..ae24626b 100644 --- a/src/wl_window.c +++ b/src/wl_window.c @@ -1725,7 +1725,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; @@ -1765,6 +1765,7 @@ static void dataSourceHandleSend(void* data, return; } len -= ret; + string += ret; } close(fd); }