Allow writing key B even when no key A was found

Likely a copy/paste bug

Signed-off-by: Flole <Flole998@users.noreply.github.com>
This commit is contained in:
Flole 2025-07-29 15:08:46 +02:00 committed by GitHub
commit 4f77c18ab4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -977,7 +977,7 @@ int createMfcKeyDump(const char *preferredName, uint8_t sectorsCnt, const sector
} }
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[1])
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));