From 527bbec02842e9ecdd1432996bc43e7ef3361823 Mon Sep 17 00:00:00 2001 From: James Bursa Date: Mon, 7 Mar 2005 21:30:28 +0000 Subject: [project @ 2005-03-07 21:30:28 by bursa] Fix some more FP exceptions related to layout. svn path=/import/netsurf/; revision=1528 --- render/layout.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'render') 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 || -- cgit v1.2.3