From 241b746f3e5de0da760a667d137b43c86057fec4 Mon Sep 17 00:00:00 2001 From: Youngbok Shin Date: Mon, 14 Nov 2016 10:54:53 +0900 Subject: [PATCH] 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. Change-Id: Icccea39a145f36cda34edca922bdbc7da0e731da --- src/lib/evas/canvas/evas_object_textblock.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lib/evas/canvas/evas_object_textblock.c b/src/lib/evas/canvas/evas_object_textblock.c index 363617f..8f6908e 100644 --- a/src/lib/evas/canvas/evas_object_textblock.c +++ b/src/lib/evas/canvas/evas_object_textblock.c @@ -5263,13 +5263,14 @@ _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; /* TIZEN_ONLY(20161011): add ellipsis_disabled_set/get APIs - if ((0 <= ellip) && (ellip < 1.0)) + if ((0 <= ellip) && (ellip < 1.0) && c->line_no == 0) */ - if (!c->o->ellipsis_disabled && (0 <= ellip) && (ellip < 1.0)) + if (!c->o->ellipsis_disabled && (0 <= ellip) && (ellip < 1.0) && c->line_no == 0) /* END */ _layout_par_ellipsis_items(c, ellip); } -- 2.7.4