diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2014-11-17 13:49:33 +0100 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2014-12-03 12:25:52 +0100 |
commit | 6a603b5b55262c443bf780f3c112a586cb3d9901 (patch) | |
tree | b92ebf6d495bc7638065dae7a551dafab606ceef | |
parent | 4860398de42bbaee9bbbdd28ccb16761d5f06e0b (diff) | |
download | mupdf-6a603b5b55262c443bf780f3c112a586cb3d9901.tar.xz |
html: Fix line breaking bugs resulting in infinite loops.
-rw-r--r-- | source/html/layout.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/html/layout.c b/source/html/layout.c index f2a8582c..4f778cc5 100644 --- a/source/html/layout.c +++ b/source/html/layout.c @@ -265,7 +265,7 @@ static void measure_word(fz_context *ctx, struct flow *node, float em) static float measure_line(struct flow *node, struct flow *end) { float h = 0; - while (node) + while (node != end) { if (node->h > h) h = node->h; @@ -381,6 +381,7 @@ static void layout_flow(fz_context *ctx, struct box *box, struct box *top, float box->h += avail; layout_line(ctx, indent, top->w, line_w, align, line_start, line_end, box); box->h += line_h; + word_start = find_next_word(line_end, &glue_w); line_start = word_start; line_end = NULL; indent = 0; |