diff options
author | James Bursa <james@netsurf-browser.org> | 2004-03-22 00:37:38 +0000 |
---|---|---|
committer | James Bursa <james@netsurf-browser.org> | 2004-03-22 00:37:38 +0000 |
commit | 85e6f03a92944663f1588fdd040dcce283ea76d2 (patch) | |
tree | 691df0d12bf4a503b3386aa77f798fa20d2010d8 /render/layout.c | |
parent | 2c757c1e795d2dec37a55cccb5d882079a9b8cc6 (diff) | |
download | netsurf-85e6f03a92944663f1588fdd040dcce283ea76d2.tar.gz netsurf-85e6f03a92944663f1588fdd040dcce283ea76d2.tar.bz2 |
[project @ 2004-03-22 00:37:38 by bursa]
Minor change in layout_line() to fix some failures.
svn path=/import/netsurf/; revision=651
Diffstat (limited to 'render/layout.c')
-rw-r--r-- | render/layout.c | 3 |
1 files changed, 2 insertions, 1 deletions
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); |