i'm not dumb i swear

This commit is contained in:
Pika 2019-05-02 19:25:48 -04:00
parent da380722de
commit e578d30911

View file

@ -673,7 +673,7 @@ void Utils::RebootToFatalError(AtmosphereFatalErrorContext *ctx) {
void Utils::CreateBlankProdInfoIfNeeded() { void Utils::CreateBlankProdInfoIfNeeded() {
Result rc; Result rc;
rc = fsFsOpenFile(&g_sd_filesystem, "/atmosphere/automatic_backups/prodinfo_blank.bin", FS_OPEN_READ, &g_blank_prodinfo_file); rc = fsFsOpenFile(&g_sd_filesystem, "/atmosphere/automatic_backups/prodinfo_blank.bin", FS_OPEN_READ | FS_OPEN_WRITE, &g_blank_prodinfo_file);
if (R_SUCCEEDED(rc)) { if (R_SUCCEEDED(rc)) {
return; return;
} }
@ -723,7 +723,7 @@ void Utils::CreateBlankProdInfoIfNeeded() {
memcpy(&p[hash_offset], hash, 0x20); memcpy(&p[hash_offset], hash, 0x20);
} }
rc = fsFsOpenFile(&g_sd_filesystem, "/atmosphere/automatic_backups/prodinfo_blank.bin", FS_OPEN_WRITE, &g_blank_prodinfo_file); rc = fsFsOpenFile(&g_sd_filesystem, "/atmosphere/automatic_backups/prodinfo_blank.bin", FS_OPEN_READ | FS_OPEN_WRITE, &g_blank_prodinfo_file);
if (R_FAILED(rc)) { if (R_FAILED(rc)) {
std::abort(); std::abort();
} }