mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 05:13:46 -07:00
zerobased index
This commit is contained in:
parent
e5b075ed3b
commit
c85258e042
1 changed files with 2 additions and 1 deletions
|
@ -379,7 +379,8 @@ static int mf_print_keys(uint16_t n, uint8_t *d) {
|
||||||
if (mfIsSectorTrailer(i) == false) {
|
if (mfIsSectorTrailer(i) == false) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
uint8_t sec = MIN(sectors, mfSectorNum(i));
|
// zero based index...
|
||||||
|
uint8_t sec = MIN(sectors - 1, mfSectorNum(i));
|
||||||
e_sector[sec].foundKey[0] = 1;
|
e_sector[sec].foundKey[0] = 1;
|
||||||
e_sector[sec].Key[0] = bytes_to_num(d + (i * MFBLOCK_SIZE), MIFARE_KEY_SIZE);
|
e_sector[sec].Key[0] = bytes_to_num(d + (i * MFBLOCK_SIZE), MIFARE_KEY_SIZE);
|
||||||
e_sector[sec].foundKey[1] = 1;
|
e_sector[sec].foundKey[1] = 1;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue