From 02fc845a723effa6a40797cd5c6bbead9b0bae3a Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Fri, 14 Dec 2018 18:01:18 +0000 Subject: [PATCH] Make sure nptfront is explicitly > 0, so we don't alloc a poly for negative number points at all --- src/hardware/hw_bsp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hardware/hw_bsp.c b/src/hardware/hw_bsp.c index 271d832a..c75d0b48 100644 --- a/src/hardware/hw_bsp.c +++ b/src/hardware/hw_bsp.c @@ -387,7 +387,7 @@ static void SplitPoly (fdivline_t *bsp, //splitting parametric line *backpoly = HWR_AllocPoly(2 + nptback); else *backpoly = NULL; - if (nptfront) + if (nptfront > 0) *frontpoly = HWR_AllocPoly(2 + nptfront); else *frontpoly = NULL;