diff --git a/src/fceu-memory.c b/src/fceu-memory.c index 0262560..0e38cc8 100644 --- a/src/fceu-memory.c +++ b/src/fceu-memory.c @@ -34,6 +34,7 @@ void *FCEU_gmalloc(uint32 size) FCEU_PrintError("Error allocating memory! Doing a hard exit."); exit(1); } + memset(ret, 0, size); return ret; } @@ -47,7 +48,7 @@ void *FCEU_malloc(uint32 size) FCEU_PrintError("Error allocating memory!"); ret = 0; } - + memset(ret, 0, size); return ret; }