[project @ 2004-03-22 00:37:38 by bursa]

Minor change in layout_line() to fix some failures.

svn path=/import/netsurf/; revision=651
This commit is contained in:
James Bursa 2004-03-22 00:37:38 +00:00
parent 2c757c1e79
commit 85e6f03a92

View File

@ -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);