Browse Source

Stop after last data point, preventing read overrun of nscale.

pre-master-46
Giles Atkinson 2 years ago
parent
commit
3cf8fe8c41
  1. 2
      src/maths/poly/interpolate.c

2
src/maths/poly/interpolate.c

@ -133,7 +133,7 @@ ft_interpolate(double *data, double *ndata, double *oscale, int olen,
/* Now plot the rest, piece by piece. l is the /* Now plot the rest, piece by piece. l is the
* last element under consideration. * last element under consideration.
*/ */
for (++l; l < olen; l++) {
for (++l; l < olen && lastone < nlen - 1; l++) {
double out; double out;
/* Shift the old stuff by one and get another value. */ /* Shift the old stuff by one and get another value. */

Loading…
Cancel
Save