From dd503b47fd583356cbbf2e2e7a1eed0ac5ba939e Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Tue, 17 May 2011 07:08:33 +0000 Subject: [PATCH] Evas textblock: Fix a potential bug in wrapping. SVN revision: 59464 --- legacy/evas/src/lib/canvas/evas_object_textblock.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/legacy/evas/src/lib/canvas/evas_object_textblock.c b/legacy/evas/src/lib/canvas/evas_object_textblock.c index fc1eff758f..7b4525fa91 100644 --- a/legacy/evas/src/lib/canvas/evas_object_textblock.c +++ b/legacy/evas/src/lib/canvas/evas_object_textblock.c @@ -3488,7 +3488,10 @@ _layout_visualize_par(Ctxt *c) EINA_INLIST_GET(it))); continue; } - else if (uwrap >= ti->parent.text_pos + + /* If it points to the end, it means the previous + * char is a whitespace we should remove, so this + * is a wanted cutting point. */ + else if (uwrap > ti->parent.text_pos + ti->text_props.text_len) wrap = -1; /* Delay the cut in a smart way i.e use the item_pos as the line_start, because