From 86c2948eb4d4fa75e28182472094d0812fabb29e Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Wed, 9 Feb 2011 20:31:34 +0000 Subject: Fix copying text/plain to clipboard svn path=/trunk/netsurf/; revision=11636 --- atari/gui.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'atari/gui.c') diff --git a/atari/gui.c b/atari/gui.c index 9f1c3d1d3..c848f3ff5 100755 --- a/atari/gui.c +++ b/atari/gui.c @@ -876,14 +876,15 @@ gui_selection_traverse_handler(const char *text, const char *space_text, size_t space_length) { + bool add_space = box != NULL ? box->space : false; - if (space_text) { + if (space_text != NULL && space_length > 0) { if (!gui_add_to_clipboard(space_text, space_length, false)) { return false; } } - if (!gui_add_to_clipboard(text, length, box->space)) + if (!gui_add_to_clipboard(text, length, add_space)) return false; return true; -- cgit v1.2.3