mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-29 07:39:43 -05:00
Fix a QStringList bounds error in auto-sequencing
This commit is contained in:
parent
db7d3e93f7
commit
e51bfc8397
@ -3367,12 +3367,16 @@ void MainWindow::auto_sequence (DecodedText const& message, unsigned start_toler
|
|||||||
|| !message.isStandardMessage ()); // free text 73/RR73
|
|| !message.isStandardMessage ()); // free text 73/RR73
|
||||||
|
|
||||||
QStringList w=message.string().mid(22).remove("<").remove(">").split(" ",QString::SkipEmptyParts);
|
QStringList w=message.string().mid(22).remove("<").remove(">").split(" ",QString::SkipEmptyParts);
|
||||||
QString w2=w.at(2);
|
QString w2;
|
||||||
int nrpt=0;
|
int nrpt=0;
|
||||||
|
if (w.size () > 2)
|
||||||
|
{
|
||||||
|
w2=w.at(2);
|
||||||
if(w.size()>3) {
|
if(w.size()>3) {
|
||||||
nrpt=w2.toInt();
|
nrpt=w2.toInt();
|
||||||
if(w2=="R") nrpt=w.at(3).toInt();
|
if(w2=="R") nrpt=w.at(3).toInt();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
bool bEU_VHF=(nrpt>=520001 and nrpt<=594000);
|
bool bEU_VHF=(nrpt>=520001 and nrpt<=594000);
|
||||||
if(bEU_VHF and message.string().contains("<"+m_config.my_callsign() + "> ")) {
|
if(bEU_VHF and message.string().contains("<"+m_config.my_callsign() + "> ")) {
|
||||||
m_xRcvd=message.string().trimmed().right(13);
|
m_xRcvd=message.string().trimmed().right(13);
|
||||||
@ -4574,9 +4578,9 @@ void MainWindow::processMessage (DecodedText const& message, Qt::KeyboardModifie
|
|||||||
|| (firstcall == "DE")) {
|
|| (firstcall == "DE")) {
|
||||||
|
|
||||||
QStringList w=message.string().mid(24).remove("<").remove(">").split(" ",QString::SkipEmptyParts);
|
QStringList w=message.string().mid(24).remove("<").remove(">").split(" ",QString::SkipEmptyParts);
|
||||||
QString w2="";
|
QString w2;
|
||||||
if(w.size()>=3) w2=w.at(2);
|
if(w.size()>=3) w2=w.at(2);
|
||||||
QString w34="";
|
QString w34;
|
||||||
if(w.size()>=4) w34=w.at(3);
|
if(w.size()>=4) w34=w.at(3);
|
||||||
int nrpt=w2.toInt();
|
int nrpt=w2.toInt();
|
||||||
if(w2=="R") {
|
if(w2=="R") {
|
||||||
|
Loading…
Reference in New Issue
Block a user