Fixed data string parsing bug where an empty string created by a trailing space would be interpreted as a 0 and then added as a data byte

This affected editing of the data in the table as well as loading data from a saved file
This commit is contained in:
Andy Huska
2022-09-17 13:16:02 -05:00
parent 2afd41b681
commit 99640d7239
+1 -1
View File
@@ -898,7 +898,7 @@ void FrameSenderWindow::processCellChange(int line, int col)
case 6: //Data bytes
for (int i = 0; i < 8; i++) sendingData[line].payload().data()[i] = 0;
tokens = ui->tableSender->item(line, 6)->text().split(" ");
tokens = ui->tableSender->item(line, 6)->text().split(" ", QString::SkipEmptyParts);
arr.clear();
arr.reserve(tokens.count());
for (int j = 0; j < tokens.count(); j++)