From e3d16649b87f93876dbe65f49cdc96f9ffa8bb79 Mon Sep 17 00:00:00 2001 From: Lukas Kuzmiak Date: Mon, 8 Jun 2020 21:19:36 -0700 Subject: [PATCH] MAD application code & cluster code were swapped --- client/src/mifare/mad.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/mifare/mad.c b/client/src/mifare/mad.c index ffacba3a7..0761317fe 100644 --- a/client/src/mifare/mad.c +++ b/client/src/mifare/mad.c @@ -129,9 +129,9 @@ static int madCRCCheck(uint8_t *sector, bool verbose, int MADver) { static uint16_t madGetAID(uint8_t *sector, int MADver, int sectorNo) { if (MADver == 1) - return (sector[16 + 2 + (sectorNo - 1) * 2] << 8) + (sector[16 + 2 + (sectorNo - 1) * 2 + 1]); + return (sector[16 + 2 + (sectorNo - 1) * 2 + 1] << 8) + (sector[16 + 2 + (sectorNo - 1) * 2]); else - return (sector[2 + (sectorNo - 1) * 2] << 8) + (sector[2 + (sectorNo - 1) * 2 + 1]); + return (sector[2 + (sectorNo - 1) * 2 + 1] << 8) + (sector[2 + (sectorNo - 1) * 2]); } int MADCheck(uint8_t *sector0, uint8_t *sector10, bool verbose, bool *haveMAD2) {