summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2016-03-30 16:37:25 +0100
committerRobin Watts <robin.watts@artifex.com>2016-03-30 16:40:32 +0100
commitf863e1ad7ecf0e67db5906f9562682a2e7ae7b5f (patch)
tree8e6d21641429bbb0337bbc11d3d0509539e9ad33
parentf68b2a1b1cf0c9d5fd08ca3d130f7ab4ab6ed762 (diff)
downloadmupdf-f863e1ad7ecf0e67db5906f9562682a2e7ae7b5f.tar.xz
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.
-rw-r--r--source/html/html-layout.c2
1 files changed, 1 insertions, 1 deletions
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;