From 789b487da238913b8ec65e7cb99e0e658c6d51bc Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Wed, 9 Nov 2011 07:36:50 +0000 Subject: [PATCH] Evas textblock: Fixed 1 more clang error. http://dev.enlightenment.fr/~discomfitor/evas-2011-11-08/report-XA8yiy.html#EndPath SVN revision: 64976 --- legacy/evas/src/lib/engines/common/evas_font_query.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/legacy/evas/src/lib/engines/common/evas_font_query.c b/legacy/evas/src/lib/engines/common/evas_font_query.c index 5b097e0da5..8852c1b1e1 100644 --- a/legacy/evas/src/lib/engines/common/evas_font_query.c +++ b/legacy/evas/src/lib/engines/common/evas_font_query.c @@ -723,22 +723,23 @@ evas_common_font_query_last_up_to_pos(RGBA_Font *fn, const Evas_Text_Props *text #ifdef BIDI_SUPPORT if (text_props->bidi.dir == EVAS_BIDI_DIRECTION_RTL) { - Evas_Font_Glyph_Info *gli = (text_props->info) ? - text_props->info->glyph + text_props->start : NULL; + Evas_Font_Glyph_Info *gli = NULL; Evas_Coord full_adv = 0, pen_x = 0, start_pen = 0; int i; - if (text_props->len > 0) + if ((text_props->info) && (text_props->len > 0)) { + gli = text_props->info->glyph + text_props->start; full_adv = gli[text_props->len - 1].pen_after; if (text_props->start > 0) { start_pen = gli[-1].pen_after; full_adv -= start_pen; } + + gli += text_props->len - 1; } - gli += text_props->len - 1; for (i = text_props->len - 1 ; i >= 0 ; i--, gli--) { pen_x = full_adv - (gli->pen_after - start_pen);