From: j8takagi Date: Sun, 7 Mar 2010 02:55:36 +0000 (+0900) Subject: メモリの初期化時のサイズ不正を修正 X-Git-Tag: v0.1p15~54 X-Git-Url: https://j8takagi.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0d4b9c46b5bc91056e3540d03f8ded287cc004e7;p=YACASL2.git メモリの初期化時のサイズ不正を修正 --- diff --git a/src/exec.c b/src/exec.c index 5e1f56d..6e0af10 100644 --- a/src/exec.c +++ b/src/exec.c @@ -273,7 +273,7 @@ void reset() GR[i] = 0x0; } SP = PR = FR = 0x0; - memory = malloc(memsize); + memory = malloc(memsize * sizeof(WORD)); for(i = 0; i < memsize; i++) { memory[i] = 0x0; }