summaryrefslogtreecommitdiff
path: root/render/layout.c
diff options
context:
space:
mode:
authorJames Bursa <james@netsurf-browser.org>2005-04-09 13:25:54 +0000
committerJames Bursa <james@netsurf-browser.org>2005-04-09 13:25:54 +0000
commit49fdeafbbfc45792b27a6d9902c2b96998897130 (patch)
tree65aa676e23813785f3aba75b33b669b3850007e6 /render/layout.c
parentf9d5c0f7c8b9a0664f1ca2cd1feb50b8230e02a7 (diff)
downloadnetsurf-49fdeafbbfc45792b27a6d9902c2b96998897130.tar.gz
netsurf-49fdeafbbfc45792b27a6d9902c2b96998897130.tar.bz2
[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
Diffstat (limited to 'render/layout.c')
-rw-r--r--render/layout.c2
1 files changed, 2 insertions, 0 deletions
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;