mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-22 12:23:37 -05:00
Protect against bounds error in qra64zap.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/map65@7537 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
571cae29f0
commit
025cd28e0a
@ -32,6 +32,8 @@ subroutine qra64zap(cx,cy,nzap)
|
||||
nw=3
|
||||
do n=1,3
|
||||
nw=2*nw
|
||||
if(ipk-2*nw.lt.-1312) cycle
|
||||
if(ipk+2*nw.gt. 1312) cycle
|
||||
s1=maxval(s(ipk-2*nw:ipk-nw))
|
||||
s2=maxval(s(ipk+nw:ipk+2*nw))
|
||||
if(smax.gt.slimit .and. s1.lt.sbottom .and. s2.lt.sbottom) then
|
||||
@ -42,7 +44,6 @@ subroutine qra64zap(cx,cy,nzap)
|
||||
ib=(i0+nw)*nadd
|
||||
cx(ia:ib)=0.
|
||||
cy(ia:ib)=0.
|
||||
! print*,'!',nzap,ipk*df,nw
|
||||
exit
|
||||
endif
|
||||
enddo
|
||||
|
@ -1,4 +1,4 @@
|
||||
//--------------------------------------------------------------- MainWindow
|
||||
//---------------------------------------------------------------- MainWindow
|
||||
#include "mainwindow.h"
|
||||
#include "ui_mainwindow.h"
|
||||
#include "devsetup.h"
|
||||
|
15
plotter.cpp
15
plotter.cpp
@ -139,18 +139,21 @@ void CPlotter::paintEvent(QPaintEvent *) // paintEvent()
|
||||
if(f) {
|
||||
int x,y;
|
||||
float freq,sync;
|
||||
float slimit=6.0;
|
||||
QPen pen0(Qt::red,1);
|
||||
painter2.setPen(pen0);
|
||||
for(int i=0; i<99999; i++) {
|
||||
f >> freq >> sync;
|
||||
if(f.eof()) break;
|
||||
x=(freq - m_ZoomStartFreq)/df;
|
||||
y=(sync-1.5)*2.0;
|
||||
if(y>15.0) y=15.0;
|
||||
if(x>=0 and x<=w) painter2.drawLine(x,0,x,y);
|
||||
x=XfromFreq(float(fQSO()+0.001*freq));
|
||||
painter1.setPen(pen0);
|
||||
painter1.drawLine(x,0,x,y);
|
||||
y=(sync-slimit)*3.0;
|
||||
if(y>0) {
|
||||
if(y>15.0) y=15.0;
|
||||
if(x>=0 and x<=w) painter2.drawLine(x,0,x,y);
|
||||
x=XfromFreq(float(fQSO()+0.001*freq));
|
||||
painter1.setPen(pen0);
|
||||
painter1.drawLine(x,0,x,y);
|
||||
}
|
||||
}
|
||||
f.close();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user