mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-10-01 01:26:39 -04:00
Fix an out of bounds error. Thanks Joe.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@7682 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
303eecdfd6
commit
3099147891
@ -164,18 +164,19 @@ subroutine nextpat(mi,k,iorder,iflag)
|
|||||||
do i=1,k-1
|
do i=1,k-1
|
||||||
if( mi(i).eq.0 .and. mi(i+1).eq.1) ind=i
|
if( mi(i).eq.0 .and. mi(i+1).eq.1) ind=i
|
||||||
enddo
|
enddo
|
||||||
if(ind.ge.1 .and. ind.le.k) then !### JHT temporary ### Correct ???
|
if( ind .lt. 0 ) then ! no more patterns of this order
|
||||||
ms=0
|
iflag=ind
|
||||||
ms(1:ind-1)=mi(1:ind-1)
|
return
|
||||||
ms(ind)=1
|
endif
|
||||||
ms(ind+1)=0
|
ms=0
|
||||||
if( ind+1 .lt. k ) then
|
ms(1:ind-1)=mi(1:ind-1)
|
||||||
nz=iorder-sum(ms)
|
ms(ind)=1
|
||||||
ms(k-nz+1:k)=1
|
ms(ind+1)=0
|
||||||
endif
|
if( ind+1 .lt. k ) then
|
||||||
mi=ms
|
nz=iorder-sum(ms)
|
||||||
endif !### JHT temporary ###
|
ms(k-nz+1:k)=1
|
||||||
|
endif
|
||||||
|
mi=ms
|
||||||
iflag=ind
|
iflag=ind
|
||||||
|
|
||||||
return
|
return
|
||||||
end subroutine nextpat
|
end subroutine nextpat
|
||||||
|
Loading…
Reference in New Issue
Block a user