From c46f878f8bf40664a8df9ea488356d7adb9f5c5f Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Sun, 6 Sep 2020 09:48:53 -0700 Subject: [PATCH] use agxbprint in layerPagePrefix --- lib/common/emit.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/common/emit.c b/lib/common/emit.c index 8ae88d51e..b84496413 100644 --- a/lib/common/emit.c +++ b/lib/common/emit.c @@ -180,14 +180,11 @@ initMapData (GVJ_t* job, char* lbl, char* url, char* tooltip, char* target, char static void layerPagePrefix (GVJ_t* job, agxbuf* xb) { - char buf[128]; /* large enough for 2 decimal 64-bit ints and "page_," */ if (job->layerNum > 1 && (job->flags & GVDEVICE_DOES_LAYERS)) { - agxbput (xb, job->gvc->layerIDs[job->layerNum]); - agxbputc (xb, '_'); + agxbprint (xb, "%s_", job->gvc->layerIDs[job->layerNum]); } if ((job->pagesArrayElem.x > 0) || (job->pagesArrayElem.y > 0)) { - sprintf (buf, "page%d,%d_", job->pagesArrayElem.x, job->pagesArrayElem.y); - agxbput (xb, buf); + agxbprint (xb, "page%d,%d_", job->pagesArrayElem.x, job->pagesArrayElem.y); } } -- 2.40.0