From a6e1b91d843620aee5c5c8781550fa42f0bab3a1 Mon Sep 17 00:00:00 2001 From: Collin Kidder Date: Sun, 9 May 2021 08:42:15 -0400 Subject: [PATCH] Fix off by one error in PCAN file loader --- framefileio.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/framefileio.cpp b/framefileio.cpp index aaee668..6554eac 100644 --- a/framefileio.cpp +++ b/framefileio.cpp @@ -1445,11 +1445,11 @@ bool FrameFileIO::loadPCANFile(QString filename, QVector* frames) //; | | | | | | | | //;---+-- ------+------ +- --+-- ---+---- +- -+-- -+ -- -- -- -- -- -- -- // 0-6 8-20 22 25-26 38 41-? two chars each + space - // 1) 1004.898 1 Tx 079B - 8 02 21 04 00 00 00 00 00 + // 1) 1004.898 1 Tx 1fff079B - 8 02 21 04 00 00 00 00 00 else if (fileVersion == 13) { thisFrame.setTimeStamp(QCanBusFrame::TimeStamp(0, static_cast(line.mid(8, 13).simplified().toDouble() * 1000.0))); - thisFrame.setFrameId(line.mid(30, 8).simplified().toUInt(nullptr, 16)); + thisFrame.setFrameId(line.mid(31, 8).simplified().toUInt(nullptr, 16)); if (thisFrame.frameId() < 0x1FFFFFFF) { int numBytes = line.mid(43,2).trimmed().toInt();