_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.
This commit is contained in:
parent
732c684756
commit
3b4640dee4
|
|
@ -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…
Reference in New Issue