From 225c4f500c503582176cd408abd6804146439265 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Sun, 6 Sep 2020 08:41:53 -0700 Subject: [PATCH] use agxbprint in genBundleInfo --- cmd/mingle/minglemain.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/cmd/mingle/minglemain.c b/cmd/mingle/minglemain.c index 522e424cd..551afbf9e 100644 --- a/cmd/mingle/minglemain.c +++ b/cmd/mingle/minglemain.c @@ -280,7 +280,6 @@ static void genBundleInfo (pedge edge, agxbuf* xb) { int k, j; - char buf[BUFSIZ]; int dim = edge->dim; real* x = edge->x; @@ -288,13 +287,11 @@ genBundleInfo (pedge edge, agxbuf* xb) if (j != 0) agxbputc(xb, ':'); for (k = 0; k < dim; k++) { if (k != 0) agxbputc(xb, ','); - sprintf(buf, "%.03f", x[j*dim+k]); - agxbput(xb, buf); + agxbprint(xb, "%.03f", x[j*dim+k]); } if ((j < edge->npoints-1) && (edge->wgts)) { - sprintf(buf, ";%.03f", edge->wgts[j]); - agxbput(xb, buf); + agxbprint(xb, ";%.03f", edge->wgts[j]); } } } -- 2.40.0