From a9f73f414d554756b6f6854d9e0a67b7c2a72057 Mon Sep 17 00:00:00 2001 From: Romain Tartiere Date: Tue, 22 Jun 2010 17:11:11 +0000 Subject: [PATCH] Fix wrong trailer block number for writing MAD v2. --- libfreefare/mad.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libfreefare/mad.c b/libfreefare/mad.c index 7ebc29a..a050bfc 100644 --- a/libfreefare/mad.c +++ b/libfreefare/mad.c @@ -294,7 +294,7 @@ mad_write (MifareTag tag, Mad mad, MifareClassicKey key_b_sector_00, MifareClass if (mifare_classic_write (tag, 0x42, data) < 0) return -1; mifare_classic_trailer_block (&data, mad_key_a, 0x0, 0x1, 0x1, 0x6, 0x00, key_b_sector_10); - if (mifare_classic_write (tag, 0x42, data) < 0) return -1; + if (mifare_classic_write (tag, 0x43, data) < 0) return -1; }