mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-22 04:11:16 -05:00
Protect against bounds error when MAP65 users select too wide a display bandwidth.
This commit is contained in:
parent
70959a9796
commit
d1c7efb1aa
@ -47,6 +47,8 @@ subroutine get_candidates(ss,savg,xpol,jz,nfa,nfb,nts_jt65,nts_q65,cand,ncand)
|
|||||||
df3=96000.0/NFFT
|
df3=96000.0/NFFT
|
||||||
ia=nint(1000*nfa/df3) + 1
|
ia=nint(1000*nfa/df3) + 1
|
||||||
ib=nint(1000*nfb/df3) + 1
|
ib=nint(1000*nfb/df3) + 1
|
||||||
|
if(ia.lt.1) ia=1
|
||||||
|
if(ib.gt.NFFT-1) ib=NFFT-1
|
||||||
iz=ib-ia+1
|
iz=ib-ia+1
|
||||||
|
|
||||||
call indexx(sync(ia:ib)%ccfmax,iz,indx) !Sort by relative snr
|
call indexx(sync(ia:ib)%ccfmax,iz,indx) !Sort by relative snr
|
||||||
@ -151,6 +153,8 @@ subroutine wb_sync(ss,savg,xpol,jz,nfa,nfb)
|
|||||||
df3=96000.0/NFFT
|
df3=96000.0/NFFT
|
||||||
ia=nint(1000*nfa/df3) + 1 !Flat frequency range for WSE converters
|
ia=nint(1000*nfa/df3) + 1 !Flat frequency range for WSE converters
|
||||||
ib=nint(1000*nfb/df3) + 1
|
ib=nint(1000*nfb/df3) + 1
|
||||||
|
if(ia.lt.1) ia=1
|
||||||
|
if(ib.gt.NFFT-1) ib=NFFT-1
|
||||||
npol=1
|
npol=1
|
||||||
if(xpol) npol=4
|
if(xpol) npol=4
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user