From 4ca4af16e31a571080f35afd23db835b5826a2fe Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Mon, 28 Oct 2024 20:14:33 +0100 Subject: [PATCH] fixed the crc annotations for iclass list. They were a bit too positive --- CHANGELOG.md | 1 + client/src/cmdhflist.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 64e6eb500..4cb3f8449 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ All notable changes to this project will be documented in this file. This project uses the changelog in accordance with [keepchangelog](http://keepachangelog.com/). Please use this to write notable changes, which is not the same as git commit log... ## [unreleased][unreleased] +- Fixed `hf iclass list` - annotation crc handled better (@iceman1001) - Fixed `hf_mf_uscuid_prog.lua` - bad divisions and code style fixes (@iceman1001) - Changed `hf iclass info` - now checks for cards silicon version (@antiklesys) - Changed `hf iclass legrec` - updated script implementation to ensure functionality (@antiklesys) diff --git a/client/src/cmdhflist.c b/client/src/cmdhflist.c index aa83bc20b..f9016a29a 100644 --- a/client/src/cmdhflist.c +++ b/client/src/cmdhflist.c @@ -131,7 +131,7 @@ uint8_t iclass_CRC_check(bool isResponse, uint8_t *d, uint8_t n) { //Commands to tag //Don't include the command byte - if (!isResponse) { + if (isResponse == false) { /** These commands should have CRC. Total length leftmost 4 READ @@ -167,7 +167,7 @@ uint8_t iclass_CRC_check(bool isResponse, uint8_t *d, uint8_t n) { In conclusion, without looking at the command; any response of length 10 or 34 should have CRC **/ - if (n != 10 && n != 34) return true; + if (n != 10 && n != 34) return 2; return check_crc(CRC_ICLASS, d, n); }