diff --git a/src/include/sph_subs.h b/src/include/sph_subs.h index c01d90d7023d3d1b948de15935a7742a19719b8f..50ea288d8757cb90ffdeed0ff6ebc831e8652d89 100644 --- a/src/include/sph_subs.h +++ b/src/include/sph_subs.h @@ -1239,7 +1239,7 @@ void wmamp( ) { std::complex<double> *ylm = new std::complex<double>[1682]; int nlmp = lm * (lm + 2) + 2; - ylm[nlmp] = std::complex<double>(0.0, 0.0); + ylm[nlmp - 1] = std::complex<double>(0.0, 0.0); if (idot != 0) { if (idot != 1) { for (int n40 = 0; n40 < nsph; n40++) {