mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-04 08:21:17 -05:00
fixed an array overrun
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@6737 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
51428985b3
commit
b84a07349c
@ -163,12 +163,15 @@ subroutine syncmsk144(cdat,npts,msgreceived,fest)
|
||||
! we want ic to be the index of the first sample of the message
|
||||
ic=ipeaks(ipk)
|
||||
|
||||
if( ic .le. 864 ) ic=ic+864
|
||||
if( ic .gt. 2*864 ) ic=ic-864
|
||||
! now do fine adjustment of sync index
|
||||
! bb is used to place the sampling index at the center of the eye
|
||||
do i=1,6
|
||||
io=i-3
|
||||
ul=min(ic+io+6+864,npts)
|
||||
bb(i) = sum( ( cdat(ic+io:ul-6:6) * conjg( cdat(ic+io+6:ul:6) ) )*2 )
|
||||
ill=max(1,ic+io)
|
||||
iul=min(ic+io+6+864,npts)
|
||||
bb(i) = sum( ( cdat(ic+io:iul-6:6) * conjg( cdat(ic+io+6:iul:6) ) )*2 )
|
||||
enddo
|
||||
iloc=maxloc(abs(bb))
|
||||
ibb=iloc(1)
|
||||
|
Loading…
Reference in New Issue
Block a user