hf mf nested: transfer keys to the correct block in one sector mode.

This commit is contained in:
Arnie97 2018-01-27 01:55:38 +08:00
commit 7b7416bd3b

View file

@ -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);