This commit is contained in:
iceman1001 2019-12-26 00:22:21 +01:00
commit 03495f0b14

View file

@ -481,18 +481,18 @@ int createMfcKeyDump(const char *preferredName, uint8_t sectorsCnt, sector_t *e_
uint8_t tmp[6] = {0, 0, 0, 0, 0, 0}; uint8_t tmp[6] = {0, 0, 0, 0, 0, 0};
for (int i = 0; i < sectorsCnt; i++) { for (int i = 0; i < sectorsCnt; i++) {
if (e_sector[i].foundKey[0]) if (e_sector[i].foundKey[0])
num_to_bytes(e_sector[i].Key[0], sizeof(tmp), tmp); num_to_bytes(e_sector[i].Key[0], sizeof(tmp), tmp);
else else
memcpy(tmp, empty, sizeof(tmp)); memcpy(tmp, empty, sizeof(tmp));
fwrite(tmp, 1, sizeof(tmp), f); fwrite(tmp, 1, sizeof(tmp), f);
} }
for (int i = 0; i < sectorsCnt; i++) { for (int i = 0; i < sectorsCnt; i++) {
if (e_sector[i].foundKey[0]) if (e_sector[i].foundKey[0])
num_to_bytes(e_sector[i].Key[1], sizeof(tmp), tmp); num_to_bytes(e_sector[i].Key[1], sizeof(tmp), tmp);
else else
memcpy(tmp, empty, sizeof(tmp)); memcpy(tmp, empty, sizeof(tmp));
fwrite(tmp, 1, sizeof(tmp), f); fwrite(tmp, 1, sizeof(tmp), f);
} }