mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 22:03:42 -07:00
fixed a logic error. param N is used as total number of blocks. I is using it as zero based index...
This commit is contained in:
parent
a95ba87834
commit
37e5540aab
1 changed files with 3 additions and 1 deletions
|
@ -304,7 +304,9 @@ static int mf_print_keys(uint16_t n, uint8_t *d) {
|
|||
return PM3_EMALLOC;
|
||||
}
|
||||
|
||||
for (uint16_t i = 0; i < n; i++) {
|
||||
// n is number of blocks, but in the loop its a zero based index.
|
||||
// n = 20, i = 0-19
|
||||
for (uint16_t i = 0; i < n - 1; i++) {
|
||||
if (mfIsSectorTrailer(i)) {
|
||||
e_sector[mfSectorNum(i)].foundKey[0] = 1;
|
||||
e_sector[mfSectorNum(i)].Key[0] = bytes_to_num(d + (i * MFBLOCK_SIZE), MIFARE_KEY_SIZE);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue