cmdwiegand: skip "parity tests failed" message, if no parity tests failed

This commit is contained in:
Jakub Kramarz
2025-09-23 01:01:50 +02:00
parent 75ba4e97b1
commit b65797bf63
+5 -3
View File
@@ -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);
}