From 56e594396930485adc326101a76f526f8ba874a4 Mon Sep 17 00:00:00 2001 From: Steve Franke Date: Fri, 6 Jul 2018 17:48:58 -0500 Subject: [PATCH 1/3] Fix an out-of-bounds issue. --- mainwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index baf85734d..2c2bc8173 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -3501,7 +3501,7 @@ void MainWindow::guiUpdate() if(!m_config.bGenerate77() and itype == 6 and (m_i3>0 or m_n3>0)) m_isync=2; if(m_config.bGenerate77()) m_isync=2; // qDebug() << "itype=" << itype << "i3, n3:"<< m_i3 << m_n3 << "isync="<< m_isync << ui->tx6->text(); - char ft8msgbits[75 + 12]; //packed 75 bit ft8 message plus 12-bit CRC + char ft8msgbits[77]; genft8_(message, MyGrid, &bcontest, &m_i3, &m_n3, &m_isync, msgsent, const_cast (ft8msgbits), const_cast (itone), 37, 6, 37); From 7f85f8983dcc9ac04a082190697a2fb220ccc002 Mon Sep 17 00:00:00 2001 From: Steve Franke Date: Fri, 6 Jul 2018 18:04:56 -0500 Subject: [PATCH 2/3] Fix a c++/fortran type mismatch for ft8msgbits. --- mainwindow.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index 2c2bc8173..a3bedb1f5 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -77,7 +77,7 @@ extern "C" { fortran_charlen_t); void genft8_(char* msg, char* MyGrid, bool* bcontest, int* i3, int* n3, int* isync, char* msgsent, - char ft8msgbits[], int itone[], fortran_charlen_t, fortran_charlen_t, + int ft8msgbits[], int itone[], fortran_charlen_t, fortran_charlen_t, fortran_charlen_t); void parse77_(char* msg, int* i3, int* n3, fortran_charlen_t); @@ -3501,9 +3501,9 @@ void MainWindow::guiUpdate() if(!m_config.bGenerate77() and itype == 6 and (m_i3>0 or m_n3>0)) m_isync=2; if(m_config.bGenerate77()) m_isync=2; // qDebug() << "itype=" << itype << "i3, n3:"<< m_i3 << m_n3 << "isync="<< m_isync << ui->tx6->text(); - char ft8msgbits[77]; + int ft8msgbits[77]; genft8_(message, MyGrid, &bcontest, &m_i3, &m_n3, &m_isync, msgsent, - const_cast (ft8msgbits), const_cast (itone), 37, 6, 37); + const_cast (ft8msgbits), const_cast (itone), 37, 6, 37); if(m_config.bFox()) { //Fox must generate the full Tx waveform, not just an itone[] array. From 5948b671ebe71531a1aa122a037588f65863433e Mon Sep 17 00:00:00 2001 From: Steve Franke Date: Fri, 6 Jul 2018 18:14:56 -0500 Subject: [PATCH 3/3] Still working on getting c++/fortran interface right. --- lib/ft8/genft8.f90 | 2 +- lib/ft8/genft8_174_91.f90 | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/ft8/genft8.f90 b/lib/ft8/genft8.f90 index f473328e8..bd472363d 100644 --- a/lib/ft8/genft8.f90 +++ b/lib/ft8/genft8.f90 @@ -1,4 +1,4 @@ -subroutine genft8(msg37,mygrid,bcontest,i3,n3,isync,msgsent37,msgbits,itone) +subroutine genft8(msg37,mygrid,bcontest,i3,n3,isync,msgsent37,msgbits77,itone) ! Encode an FT8 message, producing array itone(). diff --git a/lib/ft8/genft8_174_91.f90 b/lib/ft8/genft8_174_91.f90 index 690cff1ef..67918e821 100644 --- a/lib/ft8/genft8_174_91.f90 +++ b/lib/ft8/genft8_174_91.f90 @@ -2,7 +2,6 @@ subroutine genft8_174_91(msg,mygrid,bcontest,i3,n3,msgsent,msgbits,itone) ! Encode an FT8 message, producing array itone(). - use packjt use packjt77 include 'ft8_params.f90' character msg*37,msgsent*37