From: erg Date: Sat, 16 Aug 2008 18:02:24 +0000 (+0000) Subject: Fix uninitialized variable X-Git-Tag: LAST_LIBGRAPH~32^2~3623 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4d0f7a6dfa2f143e4cfd92dbfedfe6dfd64751c7;p=graphviz Fix uninitialized variable --- diff --git a/lib/neatogen/poly.c b/lib/neatogen/poly.c index 056ba5525..5d83c8144 100644 --- a/lib/neatogen/poly.c +++ b/lib/neatogen/poly.c @@ -208,6 +208,14 @@ void makeAddPoly(Poly * pp, Agnode_t * n, float xmargin, float ymargin) case SH_POLY: poly = (polygon_t *) ND_shape_info(n); sides = poly->sides; + if (sides >= 3) { /* real polygon */ + verts = N_GNEW(sides, Point); + for (i = 0; i < sides; i++) { + verts[i].x = PS2INCH(poly->vertices[i].x); + verts[i].y = PS2INCH(poly->vertices[i].y); + } + } else + verts = genRound(n, &sides, 0, 0); if (streq(ND_shape(n)->name, "box")) pp->kind = BOX;