summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorYukihiro Matsumoto <[email protected]>2012-06-13 02:27:51 +0900
committerYukihiro Matsumoto <[email protected]>2012-06-13 02:27:51 +0900
commitd39a355af39eb8dee42ee31eed34297dd748c3a5 (patch)
tree8a37962df5b6408d371c5019d72bd593bed313ae
parentc5536326a1daa97ba3e49e963e2cf8e288bcb543 (diff)
downloadmruby-d39a355af39eb8dee42ee31eed34297dd748c3a5.tar.gz
mruby-d39a355af39eb8dee42ee31eed34297dd748c3a5.zip
wrong ary->capa size was set in ary_modify()
-rw-r--r--src/array.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/array.c b/src/array.c
index 2403a783d..b0f5febbe 100644
--- a/src/array.c
+++ b/src/array.c
@@ -122,7 +122,7 @@ ary_modify(mrb_state *mrb, struct RArray *a)
memcpy(ptr, p, len);
}
a->ptr = ptr;
- a->aux.capa = len;
+ a->aux.capa = a->len;
mrb_ary_decref(mrb, shared);
}
a->flags &= ~MRB_ARY_SHARED;