mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-09 18:30:08 +00:00
macos: Fix clipboard data size handling
We were using the allocated memory size, not the amount of data that has been written. Fixes: #5261
This commit is contained in:
parent
004f22a51c
commit
6f5d18a9f5
@ -440,7 +440,7 @@ on_data_ready_cb (GObject *object,
|
||||
|
||||
g_output_stream_close (G_OUTPUT_STREAM (wr->stream), NULL, NULL);
|
||||
|
||||
size = g_memory_output_stream_get_size (wr->stream);
|
||||
size = g_memory_output_stream_get_data_size (wr->stream);
|
||||
bytes = g_memory_output_stream_steal_data (wr->stream);
|
||||
data = [[NSData alloc] initWithBytesNoCopy:bytes
|
||||
length:size
|
||||
|
Loading…
Reference in New Issue
Block a user