summaryrefslogtreecommitdiff
path: root/render/layout.c
diff options
context:
space:
mode:
authorJames Bursa <james@netsurf-browser.org>2004-03-22 00:37:38 +0000
committerJames Bursa <james@netsurf-browser.org>2004-03-22 00:37:38 +0000
commit85e6f03a92944663f1588fdd040dcce283ea76d2 (patch)
tree691df0d12bf4a503b3386aa77f798fa20d2010d8 /render/layout.c
parent2c757c1e795d2dec37a55cccb5d882079a9b8cc6 (diff)
downloadnetsurf-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.c3
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);