From: kub Date: Mon, 26 Feb 2024 22:10:35 +0000 (+0100) Subject: mcd, fix crash (plat_mmap not zeroing memory) X-Git-Tag: v2.00~110 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d128474f6f0b36fe0c84932d0375cd9bff6efcbe;p=picodrive.git mcd, fix crash (plat_mmap not zeroing memory) --- diff --git a/pico/cd/memory.c b/pico/cd/memory.c index ac42b8c5..07578284 100644 --- a/pico/cd/memory.c +++ b/pico/cd/memory.c @@ -1225,6 +1225,7 @@ PICO_INTERNAL void PicoMemSetupCD(void) { if (!Pico_mcd) Pico_mcd = plat_mmap(0x05000000, sizeof(mcd_state), 0, 0); + memset(Pico_mcd, 0, sizeof(mcd_state)); pcd_base_address = (Pico.romsize > 0x20000 ? 0x400000 : 0x000000); // setup default main68k map