From 473a40bc114d70d84610d40b425cf1e9bc548359 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Mon, 2 Apr 2018 20:23:30 +0100 Subject: Layout: Fix min max pass calc that looked wrong. The `width` variable call be set to AUTO, which is INT_MIN, so we can't add it to max without checking it's > 0, or we'll blunder into the minmax assertions. --- render/layout.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/render/layout.c b/render/layout.c index 59fa0c905..b1d5557bd 100644 --- a/render/layout.c +++ b/render/layout.c @@ -836,7 +836,8 @@ layout_minmax_line(struct box *first, if (min < width) min = width; - max += width; + if (width > 0) + max += width; *line_has_height = true; } -- cgit v1.2.3