Solving #265 by replacing the use of empty payload length with numBytes taken from line

This commit is contained in:
Efe Can İçöz
2020-12-13 01:03:04 +03:00
parent 9fd3739f65
commit f3f7e83a36
+1 -1
View File
@@ -1375,7 +1375,7 @@ bool FrameFileIO::loadPCANFile(QString filename, QVector<CANFrame>* frames)
if (line.at(41) == 'R') {
thisFrame.setFrameType(QCanBusFrame::RemoteRequestFrame);
} else {
QList<QByteArray> tokens = line.mid(41, thisFrame.payload().length() * 3).split(' ');
QList<QByteArray> tokens = line.mid(41, numBytes * 3).split(' ');
thisFrame.setFrameType(QCanBusFrame::DataFrame);
for (int d = 0; d < numBytes; d++)
{