Zero out memory

This commit is contained in:
uyjulian 2020-01-22 02:41:06 -06:00
parent cfcfde0480
commit 36b6d0769b
No known key found for this signature in database
GPG Key ID: FEA459A8CA14685B

View File

@ -394,6 +394,7 @@ int main(int argc, char **argv)
ErrorAlert(STR_NO_MEM_ERR);
QuitEmulator();
}
memset(ram_rom_area, 0, RAMSize + 0x100000);
RAMBaseHost = ram_rom_area;
ROMBaseHost = RAMBaseHost + RAMSize;
}
@ -405,6 +406,7 @@ int main(int argc, char **argv)
ErrorAlert(STR_NO_MEM_ERR);
QuitEmulator();
}
memset(ScratchMem, 0, SCRATCH_MEM_SIZE);
ScratchMem += SCRATCH_MEM_SIZE/2; // ScratchMem points to middle of block
#endif