summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/array.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/array.c b/src/array.c
index 0360f2177..cec08b351 100644
--- a/src/array.c
+++ b/src/array.c
@@ -570,7 +570,7 @@ mrb_ary_unshift_m(mrb_state *mrb, mrb_value self)
&& a->as.heap.aux.shared->refcnt == 1 /* shared only referenced from this array */
&& a->as.heap.ptr - a->as.heap.aux.shared->ptr >= alen) /* there's room for unshifted item */ {
ary_modify_check(mrb, a);
- a->as.heap.ptr -= len;
+ a->as.heap.ptr -= alen;
ptr = a->as.heap.ptr;
}
else {