diff --git a/framefileio.cpp b/framefileio.cpp index 0d93524..11d50d5 100644 --- a/framefileio.cpp +++ b/framefileio.cpp @@ -1400,7 +1400,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++) { diff --git a/framesenderwindow.cpp b/framesenderwindow.cpp index 622f729..49ce0d0 100644 --- a/framesenderwindow.cpp +++ b/framesenderwindow.cpp @@ -694,7 +694,7 @@ void FrameSenderWindow::processTriggerText(int line) QString tok = trigToks.at(x); if (tok.left(2) == "ID") { - thisTrigger.ID = Utility::ParseStringToNum(tok.right(tok.length() - 3)); + thisTrigger.ID = Utility::ParseStringToNum(tok.right(tok.length() - 2)); if (thisTrigger.maxCount == -1) thisTrigger.maxCount = 10000000; if (thisTrigger.milliseconds == -1) thisTrigger.milliseconds = 0; //by default don't count, just send it upon trigger