Merge pull request #433 from EndangeredF1sh/master

fix bug in issue #432 Example 'FixBrickedUID' may cause card can't be read
This commit is contained in:
Rotzbua
2018-10-29 10:04:14 +01:00
committed by GitHub

View File

@@ -1881,7 +1881,7 @@ bool MFRC522::MIFARE_SetUid(byte *newUid, byte uidSize, bool logErrors) {
bool MFRC522::MIFARE_UnbrickUidSector(bool logErrors) {
MIFARE_OpenUidBackdoor(logErrors);
byte block0_buffer[] = {0x01, 0x02, 0x03, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
byte block0_buffer[] = {0x01, 0x02, 0x03, 0x04, 0x04, 0x08, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
// Write modified block 0 back to card
MFRC522::StatusCode status = MIFARE_Write((byte)0, block0_buffer, (byte)16);