From 611e5f08782173217da1f0f795e3d147571be1a1 Mon Sep 17 00:00:00 2001 From: horrordash Date: Fri, 12 Jun 2026 00:04:46 +0300 Subject: [PATCH] fix incorrect reading of MF Classic 4K --- armsrc/mifarecmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/armsrc/mifarecmd.c b/armsrc/mifarecmd.c index f81faec4b..558f9e827 100644 --- a/armsrc/mifarecmd.c +++ b/armsrc/mifarecmd.c @@ -2854,7 +2854,7 @@ int MifareECardLoad(uint8_t sectorcnt, uint8_t keytype, uint8_t *key) { break; } - if (IsSectorTrailer(b)) { + if (IsSectorTrailer(tb)) { // sector trailer, keep the keys, set only the AC uint8_t st[MIFARE_BLOCK_SIZE] = {0x00}; emlGetMem_xt(st, tb, 1, MIFARE_BLOCK_SIZE);