From c0d0ebb273242a6713fe5b37adabaf804507a6e3 Mon Sep 17 00:00:00 2001 From: Marcus10110 Date: Mon, 29 Mar 2021 15:19:42 -0700 Subject: [PATCH] fixed CRC reset with classic identifiers in V2, thanks to several user reports. removed unused local variable. --- src/LINAnalyzer.cpp | 2 +- src/LINAnalyzerResults.cpp | 1 - src/LINSimulationDataGenerator.cpp | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/LINAnalyzer.cpp b/src/LINAnalyzer.cpp index e3296fe..eba40f7 100644 --- a/src/LINAnalyzer.cpp +++ b/src/LINAnalyzer.cpp @@ -141,7 +141,7 @@ void LINAnalyzer::WorkerThread() bool classic_identifier = false; U8 identifier = byteFrame.mData1 & 0x3F; if( identifier == 0x3C || identifier == 0x3D ) - classic_identifier == true; + classic_identifier = true; mChecksum.clear(); if( mSettings->mLINVersion >= 2 && classic_identifier == false ) diff --git a/src/LINAnalyzerResults.cpp b/src/LINAnalyzerResults.cpp index 0663fb7..87a08b8 100644 --- a/src/LINAnalyzerResults.cpp +++ b/src/LINAnalyzerResults.cpp @@ -155,7 +155,6 @@ void LINAnalyzerResults::GenerateExportFile( const char* file, DisplayBase displ U64 num_frames = GetNumFrames(); for( U64 i = 0; i < num_frames; i++ ) { - U64 j; Frame frame = GetFrame( i ); if( frame.mType == headerBreak ) diff --git a/src/LINSimulationDataGenerator.cpp b/src/LINSimulationDataGenerator.cpp index 9c2fdba..a1ae4b4 100644 --- a/src/LINSimulationDataGenerator.cpp +++ b/src/LINSimulationDataGenerator.cpp @@ -59,7 +59,7 @@ void LINSimulationDataGenerator::CreateBadFrame() U8 identifier = CreateHeader(); bool classic_identifier = false; if( identifier == 0x3C || identifier == 0x3D ) - classic_identifier == true; + classic_identifier = true; if( mSettings->mLINVersion < 2 || classic_identifier == true ) mChecksum.clear(); // Version 1 starts chksum at first data byte.