mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-01 08:07:10 -04:00
Found and fixed a nasty array overrun problem.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@6730 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
c08816c9c0
commit
0e7f8abf09
@ -58,8 +58,7 @@ subroutine msk144_decode(id2,npts,nutc,nprint,line)
|
|||||||
iz=ib-ia+1
|
iz=ib-ia+1
|
||||||
cdat2(1:iz)=c(ia:ib) !Select nlen complex samples
|
cdat2(1:iz)=c(ia:ib) !Select nlen complex samples
|
||||||
t0=ia/12000.0
|
t0=ia/12000.0
|
||||||
call syncmsk144(cdat2,iz,metric,msg,freq)
|
call syncmsk144(cdat2,iz,msg,freq)
|
||||||
if(metric.eq.-9999) cycle !No output if no significant sync
|
|
||||||
if(msg(1:1).ne.' ') then
|
if(msg(1:1).ne.' ') then
|
||||||
! if(msg.ne.msg0) then
|
! if(msg.ne.msg0) then
|
||||||
nline=nline+1
|
nline=nline+1
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
subroutine syncmsk144(cdat,npts,metric,msgreceived,fest)
|
subroutine syncmsk144(cdat,npts,msgreceived,fest)
|
||||||
use iso_c_binding, only: c_loc,c_size_t
|
use iso_c_binding, only: c_loc,c_size_t
|
||||||
use packjt
|
use packjt
|
||||||
use hashing
|
use hashing
|
||||||
@ -25,7 +25,6 @@ subroutine syncmsk144(cdat,npts,metric,msgreceived,fest)
|
|||||||
integer*1, allocatable :: message(:)
|
integer*1, allocatable :: message(:)
|
||||||
integer*1 i1hashdec
|
integer*1 i1hashdec
|
||||||
integer ipeaks(10)
|
integer ipeaks(10)
|
||||||
integer metric
|
|
||||||
logical ismask(6000)
|
logical ismask(6000)
|
||||||
real cbi(42),cbq(42)
|
real cbi(42),cbq(42)
|
||||||
real tonespec(6000)
|
real tonespec(6000)
|
||||||
@ -42,7 +41,6 @@ subroutine syncmsk144(cdat,npts,metric,msgreceived,fest)
|
|||||||
data s8/0,1,1,1,0,0,1,0/
|
data s8/0,1,1,1,0,0,1,0/
|
||||||
save first,cb,pi,twopi,dt,f0,f1
|
save first,cb,pi,twopi,dt,f0,f1
|
||||||
! save
|
! save
|
||||||
|
|
||||||
if(first) then
|
if(first) then
|
||||||
! These files can be found in /lib/ldpc/jtmode_codes directory
|
! These files can be found in /lib/ldpc/jtmode_codes directory
|
||||||
pchk_file="peg-128-80-reg3.pchk"
|
pchk_file="peg-128-80-reg3.pchk"
|
||||||
@ -136,7 +134,6 @@ subroutine syncmsk144(cdat,npts,metric,msgreceived,fest)
|
|||||||
dd(max(1,ic2-7):min(npts-56*6-41,ic2+7))=0.0
|
dd(max(1,ic2-7):min(npts-56*6-41,ic2+7))=0.0
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
|
|
||||||
! See if we can find "closed brackets" - a pair of peaks that differ by 864, plus or minus
|
! See if we can find "closed brackets" - a pair of peaks that differ by 864, plus or minus
|
||||||
! This information is not yet used for anything
|
! This information is not yet used for anything
|
||||||
do ii=1,5
|
do ii=1,5
|
||||||
@ -206,7 +203,7 @@ subroutine syncmsk144(cdat,npts,metric,msgreceived,fest)
|
|||||||
fest=1500+ferr+ferr2
|
fest=1500+ferr+ferr2
|
||||||
|
|
||||||
! Remove fine frequency error
|
! Remove fine frequency error
|
||||||
call tweak1(c,npts,-ferr2,c)
|
call tweak1(c,NSPM,-ferr2,c)
|
||||||
|
|
||||||
! Estimate final frequency error and carrier phase.
|
! Estimate final frequency error and carrier phase.
|
||||||
cca=sum(c(1:1+41)*conjg(cb))
|
cca=sum(c(1:1+41)*conjg(cb))
|
||||||
@ -268,6 +265,7 @@ subroutine syncmsk144(cdat,npts,metric,msgreceived,fest)
|
|||||||
if( niterations .ge. 0.0 ) then
|
if( niterations .ge. 0.0 ) then
|
||||||
goto 778
|
goto 778
|
||||||
endif
|
endif
|
||||||
|
|
||||||
enddo
|
enddo
|
||||||
enddo
|
enddo
|
||||||
enddo
|
enddo
|
||||||
|
Loading…
Reference in New Issue
Block a user