Skip to content

Commit b65797b

Browse files
committed
cmdwiegand: skip "parity tests failed" message, if no parity tests failed
1 parent 75ba4e9 commit b65797b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

client/src/wiegand_formats.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1688,10 +1688,12 @@ bool HIDTryUnpack(wiegand_message_t *packed) {
16881688
);
16891689
}
16901690

1691-
if (packed->Length && ((found_cnt - found_invalid_par) == 0)) { // if length > 0 and no valid parity matches
1692-
PrintAndLogEx(FAILED, "Parity tests failed");
1691+
if(found_cnt > 0){
1692+
if (packed->Length && ((found_cnt - found_invalid_par) == 0)) { // if length > 0 and no valid parity matches
1693+
PrintAndLogEx(FAILED, "Parity tests failed");
1694+
}
1695+
PrintAndLogEx(NORMAL, "");
16931696
}
1694-
PrintAndLogEx(NORMAL, "");
16951697

16961698
return ((found_cnt - found_invalid_par) > 0);
16971699
}

0 commit comments

Comments
 (0)