From 048ada50fb89c3aa70fc732e05aa0eb9d429162b Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Mon, 19 Nov 2007 16:42:21 +0000 Subject: [PATCH] Fixed (benign?) bounds error in recvpkt.F90. Fixed (occasional) bounds error in display.F90. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/map65@580 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- display.F90 | 10 ++++++++-- map65.py | 2 +- recvpkt.F90 | 10 ++++++++-- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/display.F90 b/display.F90 index a10ab0076..3ed596eb5 100644 --- a/display.F90 +++ b/display.F90 @@ -52,6 +52,7 @@ subroutine display(nkeep,ncsmin) 20 i0=i nz=nz-i0+1 rewind 26 + if(nz.lt.1) go to 999 do i=1,nz j=i+i0-1 line(i)=line(j) @@ -67,8 +68,13 @@ subroutine display(nkeep,ncsmin) nstart=1 k3=0 k=1 - line2(1)=line(indx(1)) - utc2(1)=utc(indx(1)) + m=indx(1) + if(m.lt.1 .or. m.gt.MAXLINES) then + print*,'Error in display.F90: ',nz,m + m=1 + endif + line2(1)=line(m) + utc2(1)=utc(m) do i=2,nz j0=indx(i-1) j=indx(i) diff --git a/map65.py b/map65.py index 6aa61ca56..10f68b713 100644 --- a/map65.py +++ b/map65.py @@ -1,4 +1,4 @@ -#---------------------------------------------------------------------- MAP65 +#----------------------------------------------------------------------- MAP65 # $Date$ $Revision$ # from Tkinter import * diff --git a/recvpkt.F90 b/recvpkt.F90 index 200a43653..99cd499af 100644 --- a/recvpkt.F90 +++ b/recvpkt.F90 @@ -78,8 +78,14 @@ subroutine recvpkt(iarg) do i=1,174 k=k+1 d8(k)=buf8(i) - sq=sq + float(int(id(1,k,1)))**2 + float(int(id(1,k,1)))**2 + & - float(int(id(1,k,1)))**2 + float(int(id(1,k,1)))**2 + k2=k + n=1 + if(k.gt.NSMAX) then + k2=k2-NSMAX + n=2 + endif + sq=sq + float(int(id(1,k2,n)))**2 + float(int(id(1,k2,n)))**2 + & + float(int(id(1,k2,n)))**2 + float(int(id(1,k2,n)))**2 enddo sqave=sqave + u*(sq-sqave) rxnoise=10.0*log10(sqave) - 48.0