From: Daniel Hirt Date: Mon, 8 Aug 2016 12:10:56 +0000 (+0300) Subject: Canvas.text: fix segfault with ellipsis cases X-Git-Tag: upstream/1.20.0~4876 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=be461b8f1bf608f79fe68cf017974e387dbe46c3;p=platform%2Fupstream%2Fefl.git Canvas.text: fix segfault with ellipsis cases The specific handling for (0.0 <= ellip < 1) doesn't support multi-line cases. One of the main reasons is that we haven't had the chance to define the wanted behavior for multi-line. This is a temporary hack to fix a segfault. The behavior is still undefined, though. Fixes T3885. --- diff --git a/src/lib/evas/canvas/evas_object_textblock.c b/src/lib/evas/canvas/evas_object_textblock.c index f06d876..a48cda4 100644 --- a/src/lib/evas/canvas/evas_object_textblock.c +++ b/src/lib/evas/canvas/evas_object_textblock.c @@ -5245,10 +5245,11 @@ _layout_par(Ctxt *c) Currently, we assume that ellipsis is at the beginning of the paragraph. This is a safe assumption for now, as other usages seem a bit unnatural.*/ + // FIXME: revisit this for multi-line. { double ellip; ellip = it->format->ellipsis; - if ((0 <= ellip) && (ellip < 1.0)) + if ((0 <= ellip) && (ellip < 1.0) && c->line_no == 0) _layout_par_ellipsis_items(c, ellip); }