From 9dc6ce552c0052e36eceffa88547e3111885fea2 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Wed, 26 Jul 2023 11:08:45 +0200 Subject: [PATCH] I remembered not to add calls to functions inside macro calls... --- client/src/cmdhfmf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/src/cmdhfmf.c b/client/src/cmdhfmf.c index 3ab13aeb0..4d1dbbd6c 100644 --- a/client/src/cmdhfmf.c +++ b/client/src/cmdhfmf.c @@ -380,7 +380,8 @@ static int mf_print_keys(uint16_t n, uint8_t *d) { continue; } // zero based index... - uint8_t sec = MIN(sectors - 1, mfSectorNum(i)); + uint8_t lookup = mfSectorNum(i); + uint8_t sec = MIN(sectors - 1, lookup); e_sector[sec].foundKey[0] = 1; e_sector[sec].Key[0] = bytes_to_num(d + (i * MFBLOCK_SIZE), MIFARE_KEY_SIZE); e_sector[sec].foundKey[1] = 1;