From 57b4acc1eaaafc841b685b98bff383c78b266942 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Tue, 2 Apr 2013 23:12:19 +0000 Subject: [PATCH] Prevent crash when transmitting a 2-word message. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3123 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- mainwindow.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index bc1456c86..ea270f7bf 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -1385,8 +1385,7 @@ void MainWindow::guiUpdate() } QString t2=QDateTime::currentDateTimeUtc().toString("hhmm"); - if(itext==0 and w[1]==m_myCall) { - t=w[2]; + if(itext==0 and w[1]==m_myCall and w.length()>=3) { int i1; bool ok; i1=t.toInt(&ok); @@ -1403,7 +1402,7 @@ void MainWindow::guiUpdate() } } } - if(itext==1 or w[2]=="73") m_qsoStop=t2; + if(itext==1 or (w.length()==3 and w[2]=="73")) m_qsoStop=t2; m_restart=false; }