summaryrefslogtreecommitdiffhomepage
path: root/src/state.c
diff options
context:
space:
mode:
authorliyuray <[email protected]>2012-06-03 14:04:33 +0800
committerliyuray <[email protected]>2012-06-03 14:04:33 +0800
commit5b3628051b975a899082ec25847100ad2b291564 (patch)
tree3f70a119d987c1e71d2905a6a6805047f458ed89 /src/state.c
parente88e30524ee878bf0bbf665c1a6bea11a60f07d4 (diff)
downloadmruby-5b3628051b975a899082ec25847100ad2b291564.tar.gz
mruby-5b3628051b975a899082ec25847100ad2b291564.zip
issue: make test fail on mingw.
solution: initialize memory allocated.
Diffstat (limited to 'src/state.c')
-rw-r--r--src/state.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/state.c b/src/state.c
index b3946bad9..727bd8ecb 100644
--- a/src/state.c
+++ b/src/state.c
@@ -76,6 +76,7 @@ mrb_add_irep(mrb_state *mrb, int idx)
if (idx > max) max = idx+1;
mrb->irep = mrb_malloc(mrb, sizeof(mrb_irep*)*max);
+ memset(mrb->irep, 0, sizeof(mrb_irep*)*max);
mrb->irep_capa = max;
}
else if (mrb->irep_capa <= idx) {