diff --git a/framefileio.cpp b/framefileio.cpp index 20e7fb0..0663428 100644 --- a/framefileio.cpp +++ b/framefileio.cpp @@ -1375,7 +1375,7 @@ bool FrameFileIO::loadPCANFile(QString filename, QVector* frames) if (line.at(41) == 'R') { thisFrame.setFrameType(QCanBusFrame::RemoteRequestFrame); } else { - QList tokens = line.mid(41, thisFrame.payload().length() * 3).split(' '); + QList tokens = line.mid(41, numBytes * 3).split(' '); thisFrame.setFrameType(QCanBusFrame::DataFrame); for (int d = 0; d < numBytes; d++) {