mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-22 04:11:16 -05:00
Try to avoid an array bounds error that has been reported by a user. Cause unknown.
This commit is contained in:
parent
ab282fae78
commit
3611be8ba0
@ -89,7 +89,12 @@ subroutine sync8(dd,nfa,nfb,syncmin,nfqso,maxcand,s,candidate, &
|
||||
enddo
|
||||
iz=ib-ia+1
|
||||
call indexx(red(ia:ib),iz,indx)
|
||||
ibase=indx(nint(0.40*iz)) - 1 + ia
|
||||
npctile=nint(0.40*iz)
|
||||
if(npctile.lt.1) then ! something is wrong; bail out
|
||||
ncand=0
|
||||
return;
|
||||
endif
|
||||
ibase=indx(npctile) - 1 + ia
|
||||
if(ibase.lt.1) ibase=1
|
||||
if(ibase.gt.nh1) ibase=nh1
|
||||
base=red(ibase)
|
||||
|
Loading…
Reference in New Issue
Block a user