From 01bb6978b6389852c5259b135af45ecdfe9f42f8 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 6 Aug 2014 12:23:24 -0400 Subject: [PATCH] Fix assertion failure https://bugs.freedesktop.org/show_bug.cgi?id=82220 https://bugs.freedesktop.org/show_bug.cgi?id=82228 --- src/fcweight.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fcweight.c b/src/fcweight.c index c62f807..313f3f2 100644 --- a/src/fcweight.c +++ b/src/fcweight.c @@ -45,7 +45,7 @@ static int lerp(int x, int x1, int x2, int y1, int y2) { int dx = x2 - x1; int dy = y2 - y1; - assert (dx > 0 && dy > 0 && x1 <= x && x <= x2); + assert (dx > 0 && dy >= 0 && x1 <= x && x <= x2); return y1 + (dy*(x-x1) + dx/2) / dx; }