From 8d9b71ab3848729da1cf90a38a599be0b08cbb5c Mon Sep 17 00:00:00 2001 From: Hugo Villeneuve Date: Fri, 22 Nov 2013 23:42:14 -0500 Subject: [PATCH] Zero all memories when initializing program This is especially usefull to have NOP in program memory. --- src/memory.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/memory.c b/src/memory.c index 67a9266..c5b2acf 100644 --- a/src/memory.c +++ b/src/memory.c @@ -70,6 +70,8 @@ memory_init(void) log_err("%s", strerror(errno)); exit(1); } + + memset(m->buf, 0x00, m->size); } } -- 2.20.1