From 49fdeafbbfc45792b27a6d9902c2b96998897130 Mon Sep 17 00:00:00 2001 From: James Bursa Date: Sat, 9 Apr 2005 13:25:54 +0000 Subject: [project @ 2005-04-09 13:25:54 by bursa] Add an assert() to layout_line() to help detect bugs. svn path=/import/netsurf/; revision=1614 --- render/layout.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'render') diff --git a/render/layout.c b/render/layout.c index af7ca565f..a1e470433 100644 --- a/render/layout.c +++ b/render/layout.c @@ -903,6 +903,8 @@ bool layout_line(struct box *first, int width, int *y, /* pass 2: place boxes in line: loop body executed at least once */ for (x = x_previous = 0, b = first; x <= x1 - x0 && b; b = b->next) { if (b->type == BOX_INLINE || b->type == BOX_INLINE_BLOCK) { + assert(b->width != UNKNOWN_WIDTH); + x_previous = x; x += space_after; b->x = x; -- cgit v1.2.3