From 18ab1ce08742d4890dae91e88e9770c756b0d977 Mon Sep 17 00:00:00 2001 From: Joe Taylor <joe@princeton.edu> Date: Sat, 7 Jan 2023 13:38:48 -0500 Subject: [PATCH] Revert "Revert "Use snprintf in two places, replacing calls to deprecated sprintf()." (This had already been fixed by Steve!)" This reverts commit f7928f060ea86023481ac89dccba8a8ef9c5e34d. --- widgets/mainwindow.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 2f9d68a44..b9c612e14 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -4819,9 +4819,9 @@ void MainWindow::guiUpdate() if(m_transmitting) { char s[42]; if(SpecOp::FOX==m_specOp and ui->tabWidget->currentIndex()==1) { - sprintf(s,"Tx: %d Slots",foxcom_.nslots); + snprintf(s,sizeof(s),"Tx: %d Slots",foxcom_.nslots); } else { - sprintf(s,"Tx: %s",msgsent); + snprintf(s,sizeof(s),"Tx: %s",msgsent); } m_nsendingsh=0; if(s[4]==64) m_nsendingsh=1;