From 85e6f03a92944663f1588fdd040dcce283ea76d2 Mon Sep 17 00:00:00 2001 From: James Bursa Date: Mon, 22 Mar 2004 00:37:38 +0000 Subject: [project @ 2004-03-22 00:37:38 by bursa] Minor change in layout_line() to fix some failures. svn path=/import/netsurf/; revision=651 --- render/layout.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/render/layout.c b/render/layout.c index ddf1e5ce9..e7a1dce59 100644 --- a/render/layout.c +++ b/render/layout.c @@ -749,7 +749,7 @@ struct box * layout_line(struct box *first, int width, int *y, } x += space_before + w; /* fprintf(stderr, "layout_line: overflow, forcing\n"); */ - } else if (x1 - x0 <= x + space_before + w) { + } else if (x1 - x0 <= x + space_before + w || space == 0) { /* first word doesn't fit, but full width not available so leave for later */ b = split_box; assert(used_height); @@ -766,6 +766,7 @@ struct box * layout_line(struct box *first, int width, int *y, /* assert(space != split_box->text); */ if (space == 0) space = 1; + /* \todo use box pool */ c2 = memcpy(xcalloc(1, sizeof (struct box)), split_box, sizeof (struct box)); c2->text = xstrdup(split_box->text + space + 1); -- cgit v1.2.3