From 9c7890e50c40c53c170af62aae9d51cc15bdf9dc Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Tue, 16 Jan 2024 08:59:08 +0100 Subject: [PATCH] in data manrawdemode the em410xdecode resets the size if it fails to decode, render the setdemodbuf useless afterwards. --- CHANGELOG.md | 1 + client/src/cmddata.c | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1fda7b23c..d6263aca2 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 `data manrawdecode` - now copy to demodbuf even if em4100 decode fails (@iceman1001) - Changed `nfc decode` - now supports Android Managed Provision NDEF message decoding (@iceman1001) - Changed `hf_cardhopper` - Allow button presses to break, handle non-zero CID from reader by relaying RATS and improving PPS and WTX handling, more reliably cook ATS, ignore client packets on serial line (@nvx) - Fixed `data diff` - client no longer crashes when using short widths on long filenames (@iceman1001) diff --git a/client/src/cmddata.c b/client/src/cmddata.c index d1316ae7b..ff0257f6d 100644 --- a/client/src/cmddata.c +++ b/client/src/cmddata.c @@ -608,11 +608,14 @@ static int Cmdmandecoderaw(const char *Cmd) { uint64_t id = 0; uint32_t hi = 0; size_t idx = 0; - int res = Em410xDecode(bits, &size, &idx, &hi, &id); + size_t tmpsize = 0; + int res = Em410xDecode(bits, &tmpsize, &idx, &hi, &id); if (res > 0) { //need to adjust to set bitstream back to manchester encoded data //setDemodBuff(bits, size, idx); printEM410x(hi, id, false, res); + + size = tmpsize; } } setDemodBuff(bits, size, 0);