diff options
| author | Christoph Berg <myon@debian.org> | 2019-06-02 22:20:23 +0200 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2019-06-02 22:20:23 +0200 |
| commit | e6817de24bdd0a9f5677b07d6bff897a5db47794 (patch) | |
| tree | 1eba79fe1a06ab93d1025297cee39e95dfab98a4 /lib/ft8 | |
| parent | 58a14345036378f9040e269fa276ba0c97795037 (diff) | |
| parent | 851b658298afb9bafeda98ffbfa2ade612c656be (diff) | |
Update upstream source from tag 'upstream/2.1.0_rc6+repack'
Update to upstream version '2.1.0~rc6+repack'
with Debian dir 2aba196aec0548f1bb333214231be9cc9efe2d4c
Diffstat (limited to 'lib/ft8')
| -rw-r--r-- | lib/ft8/sync8.f90 | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/ft8/sync8.f90 b/lib/ft8/sync8.f90 index 3924f1ba..219c6ebf 100644 --- a/lib/ft8/sync8.f90 +++ b/lib/ft8/sync8.f90 @@ -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)
|
