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

This commit is contained in:
Giles Atkinson 2023-12-01 12:06:24 +00:00
parent 7175a39448
commit 3cf8fe8c41
1 changed files with 1 additions and 1 deletions

View File

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