diff --git a/src/save.c b/src/save.c index 67029a0..89cb3c3 100644 --- a/src/save.c +++ b/src/save.c @@ -407,7 +407,7 @@ void loadRAM(struct Memory* memory, enum StoredInfoType storeType, int compresse if (mbc7Data->dataCheck != GB_SETTINGS_HEADER) { - memset(mbc7Data->eeprom, 0, 256); + memset_s(mbc7Data->eeprom, sizeof(mbc7Data->eeprom), 0, sizeof(mbc7Data->eeprom)); mbc7Data->dataCheck = GB_SETTINGS_HEADER; } } @@ -796,4 +796,4 @@ enum StoredInfoType getDeprecatedStoredInfoType(struct GameBoy* gameboy) { return StoredInfoTypeNone; } -} \ No newline at end of file +}