From e15630fb805134ebf041a7b66ec588e347e406e3 Mon Sep 17 00:00:00 2001 From: MadMaurice Date: Tue, 29 Aug 2023 13:44:29 +0200 Subject: [PATCH] memory/ram - initialize with zeroes --- memory/ram.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/memory/ram.cpp b/memory/ram.cpp index d430a43..123a4f4 100644 --- a/memory/ram.cpp +++ b/memory/ram.cpp @@ -1,7 +1,9 @@ #include "ram.h" +#include RAM::RAM(u16 size) : size(size), readonly(false) { memory = new u8[size]; + std::memset(memory, 0, sizeof(u8) * size); } RAM::RAM(u8* memory, u16 size, bool readonly)