From a96ef2a9069e937d8e1ce19ae91fb49556065be5 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Sun, 25 Mar 2007 16:20:10 +0000 Subject: Fix assertion when table has negative mbp (1579981) svn path=/trunk/netsurf/; revision=3222 --- render/layout.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'render/layout.c') diff --git a/render/layout.c b/render/layout.c index 613ba2fa1..eb5e8e488 100644 --- a/render/layout.c +++ b/render/layout.c @@ -2358,6 +2358,10 @@ void layout_minmax_table(struct box *table) /* add margins, border, padding to min, max widths */ calculate_mbp_width(table->style, LEFT, &extra_fixed, &extra_frac); calculate_mbp_width(table->style, RIGHT, &extra_fixed, &extra_frac); + if (extra_fixed < 0) + extra_fixed = 0; + if (extra_frac < 0) + extra_frac = 0; if (1.0 <= extra_frac) extra_frac = 0.9; table->min_width = (table_min + extra_fixed) / (1.0 - extra_frac); -- cgit v1.2.3