From ca2c1a2b8bfcb3ead950673e92e33f52fa36b613 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Sun, 2 Sep 2018 18:55:13 -0400 Subject: [PATCH] Don't use "appendage" ~ or ! on decoded lines. Protect against bad read in genft8_174_91. --- displaytext.cpp | 8 ++++---- lib/ft8/genft8_174_91.f90 | 6 ++++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/displaytext.cpp b/displaytext.cpp index 7aeffe6b5..394fe658d 100644 --- a/displaytext.cpp +++ b/displaytext.cpp @@ -192,7 +192,7 @@ QString DisplayText::appendWorkedB4(QString message, QString const& callsign, QS if (!countryWorkedBefore) { // therefore not worked call either - appendage += "!"; +// appendage += "!"; *bg = m_color_DXCC; } else { if(!countryB4onBand) { @@ -206,14 +206,14 @@ QString DisplayText::appendWorkedB4(QString message, QString const& callsign, QS } else { if (!callWorkedBefore) { // but have worked the country - appendage += "~"; +// appendage += "~"; *bg = m_color_NewCall; } else { if(!callB4onBand) { - appendage += "~"; +// appendage += "~"; *bg = m_color_NewCallBand; } else { - appendage += " "; // have worked this call before +// appendage += " "; // have worked this call before *bg = m_color_CQ; } } diff --git a/lib/ft8/genft8_174_91.f90 b/lib/ft8/genft8_174_91.f90 index e64cf4ef2..f7529f4b3 100644 --- a/lib/ft8/genft8_174_91.f90 +++ b/lib/ft8/genft8_174_91.f90 @@ -16,8 +16,10 @@ subroutine genft8_174_91(msg,i3,n3,msgsent,msgbits,itone) call pack77(msg,i3,n3,c77) call unpack77(c77,msgsent) - read(c77,'(77i1)') msgbits - call encode174_91(msgbits,codeword) !Encode the test message + read(c77,'(77i1)',err=1) msgbits + go to 2 +1 write(81,*) msg,c77 ; flush(81) +2 call encode174_91(msgbits,codeword) !Encode the test message ! Message structure: S7 D29 S7 D29 S7 itone(1:7)=icos7