From 99920e43d48b29a4ee241fee67a197419a79d9a7 Mon Sep 17 00:00:00 2001 From: Emden Gansner Date: Thu, 19 Jan 2012 16:36:06 -0500 Subject: [PATCH] Make sure the bezier structure is zeroed out, in particular, the sp and ep values. Apparently, gcc -0 generates code which causes a SIGFPE when copying a double if the double has some strange form. By initializing the sp and ep, we are guaranted the x and y will either be 0 or some reasonable floating point value. See Lefty for more details. --- lib/common/splines.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/common/splines.c b/lib/common/splines.c index c81d41767..ce8d78128 100644 --- a/lib/common/splines.c +++ b/lib/common/splines.c @@ -226,6 +226,7 @@ bezier *new_spline(edge_t * e, int sz) rv->list = N_NEW(sz, pointf); rv->size = sz; rv->sflag = rv->eflag = FALSE; + rv->sp.x = rv->sp.y = rv->ep.x = rv->ep.y = 0; return rv; } -- 2.40.0