mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-25 05:38:46 -05:00
Avoid a potential out-of-bounds error.
This commit is contained in:
parent
b2d6238b63
commit
0a12b34ec5
@ -38,7 +38,7 @@ subroutine ft4_downsample(dd,newdata,f0,c)
|
||||
endif
|
||||
i0=nint(f0/df)
|
||||
c1=0.
|
||||
c1(0)=cx(i0)
|
||||
if(i0.ge.0 .and. i0.le.NMAX/2) c1(0)=cx(i0)
|
||||
do i=1,NFFT2/2
|
||||
if(i0+i.le.NMAX/2) c1(i)=cx(i0+i)
|
||||
if(i0-i.ge.0) c1(NFFT2-i)=cx(i0-i)
|
||||
|
@ -69,6 +69,7 @@ subroutine getcandidates4(dd,fa,fb,syncmin,nfqso,maxcand,savg,candidate, &
|
||||
del=0.
|
||||
if(den.ne.0.0) del=0.5*(savsm(i-1)-savsm(i+1))/den
|
||||
fpeak=(i+del)*df+f_offset
|
||||
if(fpeak.lt.0.0 .or. fpeak.gt.4910.0) cycle
|
||||
speak=savsm(i) - 0.25*(savsm(i-1)-savsm(i+1))*del
|
||||
ncand=ncand+1
|
||||
if(ncand.gt.maxcand) then
|
||||
|
Loading…
Reference in New Issue
Block a user