Oops
This commit is contained in:
@@ -83,8 +83,11 @@ void PIF::LoadEeprom(SaveType saveType, const std::string& path) {
|
|||||||
eepromSize = GetSaveSize(saveType);
|
eepromSize = GetSaveSize(saveType);
|
||||||
|
|
||||||
auto eepromVec = Util::ReadFileBinary(eepromPath);
|
auto eepromVec = Util::ReadFileBinary(eepromPath);
|
||||||
if(eepromVec.empty())
|
if(eepromVec.empty()) {
|
||||||
Util::WriteFileBinary(std::array<u8, MEMPAK_SIZE>{}, eepromPath);
|
std::vector<u8> dummy{};
|
||||||
|
dummy.resize(GetSaveSize(saveType));
|
||||||
|
Util::WriteFileBinary(dummy, eepromPath);
|
||||||
|
}
|
||||||
|
|
||||||
if (eepromVec.size() != eepromSize) {
|
if (eepromVec.size() != eepromSize) {
|
||||||
Util::panic("Corrupt eeprom!");
|
Util::panic("Corrupt eeprom!");
|
||||||
|
|||||||
Reference in New Issue
Block a user