forked from Mirror/GodMode9
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,
|
||||
(id) ? id : (type == 'X') ? "X" : (type == 'Y') ? "Y" : "");
|
||||
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;
|
||||
break;
|
||||
}
|
||||
f_close(&fp);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user