Protect against a possible bounds error.

This commit is contained in:
Joe Taylor 2021-02-02 11:39:29 -05:00
parent 14d18306e6
commit 9ca57f9a5c
2 changed files with 2 additions and 2 deletions

View File

@ -449,8 +449,8 @@ subroutine q65_ccf_22(s1,iz,jz,nfqso,ipk,jpk,f0,xdt,ccf2)
if(ccf2(i).lt.3.4) exit !Candidate limit if(ccf2(i).lt.3.4) exit !Candidate limit
f=i*df f=i*df
if(f.ge.(nfqso-ftol) .and. f.le.(nfqso+ftol)) cycle if(f.ge.(nfqso-ftol) .and. f.le.(nfqso+ftol)) cycle
i3=i-67*mode_q65 i3=max(1,i-67*mode_q65)
i4=i+3*mode_q65 i4=min(iz,i+3*mode_q65)
biggest=maxval(ccf2(i3:i4)) biggest=maxval(ccf2(i3:i4))
if(ccf2(i).ne.biggest) cycle if(ccf2(i).ne.biggest) cycle
ncand=ncand+1 ncand=ncand+1

Binary file not shown.