From 7b7416bd3b7e0b9a3003ec33da943bd26b505d82 Mon Sep 17 00:00:00 2001 From: Arnie97 Date: Sat, 27 Jan 2018 01:55:38 +0800 Subject: [PATCH 1/1] hf mf nested: transfer keys to the correct block in one sector mode. --- client/cmdhfmf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/cmdhfmf.c b/client/cmdhfmf.c index ddfb1c02..dbb6d092 100644 --- a/client/cmdhfmf.c +++ b/client/cmdhfmf.c @@ -683,9 +683,9 @@ int CmdHF14AMfNested(const char *Cmd) if (transferToEml) { uint8_t sectortrailer; if (trgBlockNo < 32*4) { // 4 block sector - sectortrailer = (trgBlockNo & 0x03) + 3; + sectortrailer = (trgBlockNo & ~0x03) + 3; } else { // 16 block sector - sectortrailer = (trgBlockNo & 0x0f) + 15; + sectortrailer = (trgBlockNo & ~0x0f) + 15; } mfEmlGetMem(keyBlock, sectortrailer, 1); -- 2.39.5