Further protection against bounds error is spec64.

This commit is contained in:
Joe Taylor 2021-06-30 11:28:03 -04:00
parent 6310fcf619
commit 8ab721bde3

View File

@ -20,6 +20,8 @@ subroutine spec64(c0,npts,nsps,mode_q65,jpk,s3,LL,NN)
j=j+1 j=j+1
ja=(k-1)*nsps + jpk ja=(k-1)*nsps + jpk
jb=ja+nsps-1 jb=ja+nsps-1
if(ja.lt.0) ja=0
if(jb.gt.npts-1) jb=npts-1
cs(0:nfft-1)=c0(ja:jb) cs(0:nfft-1)=c0(ja:jb)
call four2a(cs,nsps,1,-1,1) !c2c FFT to frequency call four2a(cs,nsps,1,-1,1) !c2c FFT to frequency
do ii=1,LL do ii=1,LL