From: erg Date: Fri, 6 Nov 2009 18:37:28 +0000 (+0000) Subject: Fix uninitialized z coord when reading polylines X-Git-Tag: LAST_LIBGRAPH~32^2~1581 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=636fdb8f87813f8756098c3b43f790fa9c6f14f0;p=graphviz Fix uninitialized z coord when reading polylines --- diff --git a/lib/xdot/xdot.c b/lib/xdot/xdot.c index 34301c50e..00abdf223 100755 --- a/lib/xdot/xdot.c +++ b/lib/xdot/xdot.c @@ -1,3 +1,4 @@ +/* $Id$Revision: */ /* vim:set shiftwidth=4 ts=8: */ /********************************************************** @@ -19,7 +20,7 @@ #include #define NEW(t) (t*)calloc(1, sizeof(t)) -#define N_NEW(n,t) (t*)malloc((n)*sizeof(t)) +#define N_NEW(n,t) (t*)calloc((n), sizeof(t)) /* the parse functions should return NULL on error */ static char *parseReal(char *s, double *fp) @@ -87,6 +88,7 @@ static char *parsePolyline(char *s, xdot_polyline * pp) } else s = endp; + ps->z = 0; ps++; } pp->pts = pts;