From ffcc3174b2b0a0601efe7e78495aec311988892e Mon Sep 17 00:00:00 2001 From: Romain Tartiere Date: Tue, 23 Feb 2010 02:00:04 +0000 Subject: [PATCH] Add missing block_number <- block that prevented full cache hits. --- libfreefare/mifare_classic.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libfreefare/mifare_classic.c b/libfreefare/mifare_classic.c index 46045d0..ac47dca 100644 --- a/libfreefare/mifare_classic.c +++ b/libfreefare/mifare_classic.c @@ -516,6 +516,7 @@ get_block_access_bits (MifareTag tag, const MifareClassicBlockNumber block, Mifa if (sector_access_bits & block_access_bits_mask & 0x00f0) *block_access_bits |= 0x02; /* C2 */ if (sector_access_bits & block_access_bits_mask & 0x0f00) *block_access_bits |= 0x04; /* C3 */ + MIFARE_CLASSIC(tag)->cached_access_bits.block_number = block; MIFARE_CLASSIC(tag)->cached_access_bits.block_access_bits = *block_access_bits; }