From: arif Date: Sun, 1 Mar 2009 16:55:49 +0000 (+0000) Subject: misplaced assert fixed X-Git-Tag: LAST_LIBGRAPH~32^2~2362 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b01342a21b062d179eb2865b0d709da696f03725;p=graphviz misplaced assert fixed --- diff --git a/plugin/core/gvrender_core_fig.c b/plugin/core/gvrender_core_fig.c index 890ec06a5..d9938bb11 100644 --- a/plugin/core/gvrender_core_fig.c +++ b/plugin/core/gvrender_core_fig.c @@ -345,7 +345,6 @@ static void fig_bezier(GVJ_t * job, pointf * A, int n, int arrow_at_start, int npoints = n; int i; - assert (n >= 4); pointf pf, V[4]; point p; @@ -355,7 +354,9 @@ static void fig_bezier(GVJ_t * job, pointf * A, int n, int arrow_at_start, char *buffer; char *buf; - buffer = + assert (n >= 4); + + buffer = malloc((npoints + 1) * (BEZIERSUBDIVISION + 1) * 20 * sizeof(char)); buf = buffer;