diff options
Diffstat (limited to 'cocoa/selection.m')
-rw-r--r-- | cocoa/selection.m | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/cocoa/selection.m b/cocoa/selection.m index 69707ba33..0acbd3b76 100644 --- a/cocoa/selection.m +++ b/cocoa/selection.m @@ -28,7 +28,6 @@ static NSMutableString *cocoa_clipboard_string; void gui_start_selection(struct gui_window *g) { - gui_empty_clipboard(); } void gui_clear_selection(struct gui_window *g) @@ -54,7 +53,7 @@ void gui_get_clipboard(char **buffer, size_t *length) const char *text = [string UTF8String]; *length = strlen(text); - *buffer = malloc(gui_clipboard.length); + *buffer = malloc(*length); if (*buffer != NULL) { memcpy(*buffer, text, *length); |