diff --git a/src/frontend/plotting/grid.c b/src/frontend/plotting/grid.c index c7f1bacbf..7a5c41e74 100644 --- a/src/frontend/plotting/grid.c +++ b/src/frontend/plotting/grid.c @@ -527,7 +527,7 @@ drawlingrid(GRAPH *graph, char *units, int spacing, int nsp, double dst, double if (j == 0) SetLinestyle(1); - snprintf(buf, sizeof(buf), "%.*f", digits + 1, m * mag / 100.0); + snprintf(buf, sizeof(buf) - 1, "%.*f", digits + 1, m * mag / 100.0); if (axis == x_axis) DevDrawText(buf, graph->viewportxoff + i -