Browse Source

Prevent crash if nsp is evaluated to 0

pre-master-46
Holger Vogt 4 years ago
parent
commit
0557bc60bf
  1. 2
      src/frontend/plotting/grid.c

2
src/frontend/plotting/grid.c

@ -633,6 +633,8 @@ lingrid(GRAPH *graph, double lo, double hi, double delta, int type, Axis axis)
nsp = (int)((hi - lo) / delta);
if (nsp > 100)
nsp = 100;
if (nsp < 1)
nsp = 1;
}
spacing = (max - margin) / nsp;

Loading…
Cancel
Save