mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-25 13:48:42 -05:00
Repair invalid string references
This commit is contained in:
parent
e99f22a5d2
commit
2a2e120d7c
@ -9117,15 +9117,15 @@ void MainWindow::write_all(QString txRx, QString message)
|
|||||||
QString msg;
|
QString msg;
|
||||||
QString mode_string;
|
QString mode_string;
|
||||||
|
|
||||||
if (message[4]==' ') {
|
if (message.size () > 5 && message[4]==' ') {
|
||||||
msg=message.mid(4,-1);
|
msg=message.mid(4,-1);
|
||||||
} else {
|
} else {
|
||||||
msg=message.mid(6,-1);
|
msg=message.mid(6,-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (message[19]=='#') {
|
if (message.size () > 19 && message[19]=='#') {
|
||||||
mode_string="JT65 ";
|
mode_string="JT65 ";
|
||||||
} else if (message[19]=='@') {
|
} else if (message.size () > 19 && message[19]=='@') {
|
||||||
mode_string="JT9 ";
|
mode_string="JT9 ";
|
||||||
} else {
|
} else {
|
||||||
mode_string=m_mode.leftJustified(6,' ');
|
mode_string=m_mode.leftJustified(6,' ');
|
||||||
|
Loading…
Reference in New Issue
Block a user