Fix IR56 wiegand decode leaking header sentinel bit into facility code
This commit is contained in:
1 parent
e3ce59f1a5
commit
d18d1c6713
3 files changed
+6
-1
No files matched your search
@@ -1472,7 +1472,9 @@ static bool Unpack_IR56(wiegand_message_t *packed, wiegand_card_t *card) {
|
||||
|
||||
if (packed->Length != 56) return false;
|
||||
|
||||
card->FacilityCode = packed->Mid;
|
||||
// Mask off the header/sentinel bit that add_HID_header sets at position 56
|
||||
// (Mid |= 1 << 24) so it doesn't leak into the 24-bit facility code.
|
||||
card->FacilityCode = packed->Mid & 0x00FFFFFF;
|
||||
card->CardNumber = packed->Bot;
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user