mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Unshift pointer move size was wrong (not len but alen); fix #3780
This commit is contained in:
+1
-1
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user