use calloc to hopefully not read random stuff
This commit is contained in:
@@ -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;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user