From b65797bf639100ee121eaa58d8ff3edf2aac977c Mon Sep 17 00:00:00 2001 From: Jakub Kramarz Date: Tue, 23 Sep 2025 00:56:10 +0200 Subject: [PATCH] cmdwiegand: skip "parity tests failed" message, if no parity tests failed --- client/src/wiegand_formats.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/client/src/wiegand_formats.c b/client/src/wiegand_formats.c index 2aa1ea3f1..cfe4d4599 100644 --- a/client/src/wiegand_formats.c +++ b/client/src/wiegand_formats.c @@ -1688,10 +1688,12 @@ bool HIDTryUnpack(wiegand_message_t *packed) { ); } - if (packed->Length && ((found_cnt - found_invalid_par) == 0)) { // if length > 0 and no valid parity matches - PrintAndLogEx(FAILED, "Parity tests failed"); + if(found_cnt > 0){ + if (packed->Length && ((found_cnt - found_invalid_par) == 0)) { // if length > 0 and no valid parity matches + PrintAndLogEx(FAILED, "Parity tests failed"); + } + PrintAndLogEx(NORMAL, ""); } - PrintAndLogEx(NORMAL, ""); return ((found_cnt - found_invalid_par) > 0); }