mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-03-23 12:38:53 -04:00
Protect against bounds errors with large NTol.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@6611 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
38cf525969
commit
3c1fe29456
@ -17,8 +17,8 @@ subroutine decode9w(nutc,nfqso,ntol,nsubmode,ss,id2,sync,nsnr,xdt1,f0,decoded)
|
||||
npts=52*12000
|
||||
limit=10000 !Fano timeout parameter
|
||||
|
||||
ia=nint((nfqso-ntol)/df) !Start frequency bin
|
||||
ib=nint((nfqso+ntol)/df) !End frequency bin
|
||||
ia=max(1,nint((nfqso-ntol)/df)) !Start frequency bin
|
||||
ib=min(NSMAX,nint((nfqso+ntol)/df)) !End frequency bin
|
||||
lag1=-int(2.5/tstep + 0.9999) !Start lag
|
||||
lag2=int(5.0/tstep + 0.9999) !End lag
|
||||
nhsym=184 !Number of half-symbols
|
||||
|
@ -12,8 +12,6 @@ subroutine lorentzian(y,npts,a)
|
||||
real a(5)
|
||||
real deltaa(4)
|
||||
|
||||
if(npts.gt.2000) stop 'Error in lorentzian'
|
||||
|
||||
a=0.
|
||||
df=12000.0/8192.0 !df = 1.465 Hz
|
||||
width=0.
|
||||
|
@ -13,12 +13,10 @@ subroutine softsym9w(id2,npts,xdt0,f0,width,nsubmode,xdt1,i1softsymbols)
|
||||
equivalence (x,cx)
|
||||
|
||||
df=12000.0/NFFT
|
||||
! i0a=1
|
||||
! i0b=5*12000
|
||||
i0a=max(1.0,(xdt0-1.0)*12000.0)
|
||||
i0b=(xdt0+1.0)*12000.0
|
||||
k1=nint((f0-0.5*width)/df)
|
||||
k2=nint((f0+0.5*width)/df)
|
||||
k1=max(1,nint((f0-0.5*width)/df))
|
||||
k2=min(NQ,nint((f0+0.5*width)/df))
|
||||
smax=0.
|
||||
i0pk=1
|
||||
i1softsymbols=0
|
||||
@ -60,8 +58,8 @@ subroutine softsym9w(id2,npts,xdt0,f0,width,nsubmode,xdt1,i1softsymbols)
|
||||
dtone=df*(2**nsubmode)
|
||||
do i=0,8
|
||||
f=f0 + i*dtone
|
||||
k1=nint((f-0.5*width)/df)
|
||||
k2=nint((f+0.5*width)/df)
|
||||
k1=max(1,nint((f-0.5*width)/df))
|
||||
k2=min(NQ,nint((f+0.5*width)/df))
|
||||
s2(i,j)=sum(s(k1:k2)) !Symbol spectra, including sync
|
||||
enddo
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user