From 5929c23e24c8f17ca97d7e6e9d34ed9f014fea72 Mon Sep 17 00:00:00 2001 From: "Steven G. Johnson" Date: Fri, 8 Jun 2018 03:44:40 +0200 Subject: [PATCH] bugfix in array indices (#371) these arrays were declared as length 2, but it sometimes accesses the third index. cc @HomerReid --- src/dft.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dft.cpp b/src/dft.cpp index f06df3c8c..511da656c 100644 --- a/src/dft.cpp +++ b/src/dft.cpp @@ -875,7 +875,7 @@ cdouble *collapse_empty_dimensions(cdouble *array, int *rank, int dims[3], volum int full_rank = *rank; if (full_rank==0) return array; - int reduced_rank=0, reduced_dims[2], reduced_stride[2]={1,1}, nd=0; + int reduced_rank=0, reduced_dims[3], reduced_stride[3]={1,1,1}, nd=0; LOOP_OVER_DIRECTIONS(dft_volume.dim, d) { int dim = dims[nd++]; if (dim==0) continue;