From: handa Date: Mon, 16 Oct 2006 00:37:43 +0000 (+0000) Subject: (draw_background): Be sure to set *to_x. X-Git-Tag: REL-1-3-4~33 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=70f2eee603a8f3e9b490b52c2cec06c5822dc993;p=m17n%2Fm17n-lib.git (draw_background): Be sure to set *to_x. (render_glyph_string): If from == to, just return. --- diff --git a/src/draw.c b/src/draw.c index ebd6544..8e88cc2 100644 --- a/src/draw.c +++ b/src/draw.c @@ -1112,6 +1112,7 @@ draw_background (MFrame *frame, MDrawWindow win, int x, int y, } *from_idx = *to_idx = 0; + *to_x = x; while (g->type != GLYPH_ANCHOR) { if (g->pos >= from && g->pos < to) @@ -1434,6 +1435,8 @@ render_glyph_string (MFrame *frame, MDrawWindow win, int x, int y, int from_idx, to_idx; int to_x; + if (from == to) + return; if (control->orientation_reversed) x -= gstring->indent + gstring_width (gstring, from, to, NULL, NULL); else