summaryrefslogtreecommitdiff
path: root/render
diff options
context:
space:
mode:
authorJames Bursa <james@netsurf-browser.org>2005-03-07 21:30:28 +0000
committerJames Bursa <james@netsurf-browser.org>2005-03-07 21:30:28 +0000
commit527bbec02842e9ecdd1432996bc43e7ef3361823 (patch)
tree4ddf7bf919b429ce73eb9aa8ebddb0b41a169cdc /render
parent8550695710d5197a038c880d05e5d30d3ab31aff (diff)
downloadnetsurf-527bbec02842e9ecdd1432996bc43e7ef3361823.tar.gz
netsurf-527bbec02842e9ecdd1432996bc43e7ef3361823.tar.bz2
[project @ 2005-03-07 21:30:28 by bursa]
Fix some more FP exceptions related to layout. svn path=/import/netsurf/; revision=1528
Diffstat (limited to 'render')
-rw-r--r--render/layout.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/render/layout.c b/render/layout.c
index a32265018..48ea15ba8 100644
--- a/render/layout.c
+++ b/render/layout.c
@@ -745,7 +745,11 @@ bool layout_line(struct box *first, int width, int *y,
/* get minimum line height from containing block */
used_height = height = line_height(first->parent->parent->style);
- /* pass 1: find height of line assuming sides at top of line */
+ if (x1 < x0)
+ x1 = x0;
+
+ /* pass 1: find height of line assuming sides at top of line: loop
+ * body executed at least once */
for (x = 0, b = first; x <= x1 - x0 && b != 0; b = b->next) {
assert(b->type == BOX_INLINE || b->type == BOX_INLINE_BLOCK ||
b->type == BOX_FLOAT_LEFT ||