From f863e1ad7ecf0e67db5906f9562682a2e7ae7b5f Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Wed, 30 Mar 2016 16:37:25 +0100 Subject: HTML Layout: avoid problems with emitting text several times. If a "word" of HTML is split into several fragments by the string walker (due to glyphs not being available in the same font) then we'd previously have walked too much of the string when pulling glyphs out of the harfbuzz buffer. Only walk as much as we should. --- source/html/html-layout.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source') diff --git a/source/html/html-layout.c b/source/html/html-layout.c index 1d76a9c5..27292c13 100644 --- a/source/html/html-layout.c +++ b/source/html/html-layout.c @@ -1327,7 +1327,7 @@ static void draw_flow_box(fz_context *ctx, fz_html *box, float page_top, float p t = walker.start; if (node->style->visibility == V_VISIBLE) { - while (*t) + while (t != walker.end) { int l = fz_chartorune(&c, t); t += l; -- cgit v1.2.3