From 65689c46cf401ab4fad40ca970f279ee506af401 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Fri, 31 Aug 2018 13:55:44 -0400 Subject: [PATCH] Protect against a bounds error. --- lib/xcor4.f90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/xcor4.f90 b/lib/xcor4.f90 index 9e1f5a529..9e4aff59b 100644 --- a/lib/xcor4.f90 +++ b/lib/xcor4.f90 @@ -37,7 +37,7 @@ subroutine xcor4(s2,ipk,nsteps,nsym,lag1,lag2,ich,mode4,ccf,ccf0, & ccfmax=0. ccfmin=0. - nw=nch(ich) + nw=nch(min(max(ich,1),7)) do j=1,nsteps n=2*mode4