From fe210c5d5895eb53fd2325dff1cf68e831d5c4ec Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Tue, 8 Jan 2013 17:52:12 +0000 Subject: Fixups. --- cocoa/selection.m | 3 +-- 1 file changed, 1 insertion(+), 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); -- cgit v1.2.3