diff options
| author | Yukihiro Matsumoto <[email protected]> | 2012-07-09 11:42:24 +0900 |
|---|---|---|
| committer | Yukihiro Matsumoto <[email protected]> | 2012-07-09 11:42:24 +0900 |
| commit | c3201370554a5d48c59f97daf61a725310d4bbbc (patch) | |
| tree | 061650ef60a9d2b30929f1b3782911ea45f53e53 /src/state.c | |
| parent | 0e2a81740a284e823894ec5b1d804e282df15b7e (diff) | |
| parent | 8cef93d228ec5d2cb57b84cf0ae3945363080546 (diff) | |
| download | mruby-c3201370554a5d48c59f97daf61a725310d4bbbc.tar.gz mruby-c3201370554a5d48c59f97daf61a725310d4bbbc.zip | |
Merge branch 'master' of github.com:mruby/mruby
Diffstat (limited to 'src/state.c')
| -rw-r--r-- | src/state.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/state.c b/src/state.c index e4729ca70..7f74606ff 100644 --- a/src/state.c +++ b/src/state.c @@ -76,8 +76,7 @@ mrb_add_irep(mrb_state *mrb, int idx) int max = 256; 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 = mrb_calloc(mrb, max, sizeof(mrb_irep*)); mrb->irep_capa = max; } else if (mrb->irep_capa <= idx) { |
