#include "config.h"
+#include <assert.h>
#include <string.h>
#include <common/memory.h>
#include <common/const.h>
#include <common/geomprocs.h>
#include <gvc/gvcproc.h>
#include <cgraph/strcasecmp.h>
+#include <stdlib.h>
extern int emit_once(char *str);
extern shape_desc *find_user_shape(char *name);
if (job->flags & GVRENDER_DOES_TRANSFORM)
gvre->polygon(job, af, n, filled);
else {
- if (sizeAF < n) {
- sizeAF = n + 10;
- AF = grealloc(AF, sizeAF * sizeof(pointf));
- }
+ pointf *AF;
+ assert(n >= 0);
+ AF = gcalloc((size_t)n, sizeof(pointf));
gvrender_ptf_A(job, af, AF, n);
gvre->polygon(job, AF, n, filled);
+ free(AF);
}
if (noPoly)
job->obj->pencolor = save_pencolor;