Browse Source

_snprintf in Windows 7 does not automatically put a '\0'

to the end of the buffer, only if there is space available.
That will change in the future if Snprintf is used.
pre-master-46
Holger Vogt 8 years ago
parent
commit
3b4640dee4
  1. 2
      src/frontend/plotting/grid.c

2
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 -

Loading…
Cancel
Save