use calloc to hopefully not read random stuff

This commit is contained in:
2026-07-17 12:31:42 +10:00
parent e7350a254f
commit f786235064

View File

@@ -226,7 +226,7 @@ void startEmulator(Emulator* emu) {
} }
Emulator* initEmulator(uint32_t memorySize) { Emulator* initEmulator(uint32_t memorySize) {
Emulator* newEmu = malloc(sizeof(Emulator)); Emulator* newEmu = calloc(1, sizeof(Emulator));
if (!newEmu) if (!newEmu)
return NULL; return NULL;