From: tasn Date: Mon, 30 May 2011 13:19:03 +0000 (+0000) Subject: Evas textblock: Don't try to move text if the length to be moved is 0. X-Git-Tag: submit/trunk/20120815.174732~1415 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=abdb0f06347ce5d7cff009c21a5b2cab521070ff;p=profile%2Fivi%2Fevas.git Evas textblock: Don't try to move text if the length to be moved is 0. git-svn-id: http://svn.enlightenment.org/svn/e/trunk/evas@59813 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/lib/canvas/evas_object_textblock.c b/src/lib/canvas/evas_object_textblock.c index 9ff5ab5..1528d23 100644 --- a/src/lib/canvas/evas_object_textblock.c +++ b/src/lib/canvas/evas_object_textblock.c @@ -6436,11 +6436,14 @@ _evas_textblock_cursor_break_paragraph(Evas_Textblock_Cursor *cur, /* cur->pos now points to the PS, move after. */ start = cur->pos + 1; - text = eina_ustrbuf_string_get(cur->node->unicode); len = eina_ustrbuf_length_get(cur->node->unicode) - start; - eina_ustrbuf_append_length(n->unicode, text + start, len); - eina_ustrbuf_remove(cur->node->unicode, start, start + len); - cur->node->dirty = EINA_TRUE; + if (len > 0) + { + text = eina_ustrbuf_string_get(cur->node->unicode); + eina_ustrbuf_append_length(n->unicode, text + start, len); + eina_ustrbuf_remove(cur->node->unicode, start, start + len); + cur->node->dirty = EINA_TRUE; + } } else {