mirror of
https://github.com/d0k3/GodMode9.git
synced 2025-06-26 21:52:48 +00:00
Prevent slot0x??key?.bin file locks
.. actually close the file after key is found
This commit is contained in:
parent
f05e77a99f
commit
73eff94484
@ -202,10 +202,8 @@ u32 LoadKeyFromFile(u8* key, u32 keyslot, char type, char* id)
|
|||||||
snprintf(path, 64, "%s/slot0x%02lXKey%s.bin", base[i], keyslot,
|
snprintf(path, 64, "%s/slot0x%02lXKey%s.bin", base[i], keyslot,
|
||||||
(id) ? id : (type == 'X') ? "X" : (type == 'Y') ? "Y" : "");
|
(id) ? id : (type == 'X') ? "X" : (type == 'Y') ? "Y" : "");
|
||||||
if (f_open(&fp, path, FA_READ | FA_OPEN_EXISTING) != FR_OK) continue;
|
if (f_open(&fp, path, FA_READ | FA_OPEN_EXISTING) != FR_OK) continue;
|
||||||
if ((f_read(&fp, key, 16, &btr) == FR_OK) && (btr == 16)) {
|
if ((f_read(&fp, key, 16, &btr) == FR_OK) && (btr == 16))
|
||||||
found = true;
|
found = true;
|
||||||
break;
|
|
||||||
}
|
|
||||||
f_close(&fp);
|
f_close(&fp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user