summaryrefslogtreecommitdiffhomepage
path: root/src/array.c
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2021-09-10 17:34:40 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2021-09-10 17:34:40 +0900
commitda749d870f4a57df7a05ef4a9ae023602d48af86 (patch)
tree50582c2727402e396091f80e79b079494df7fe58 /src/array.c
parentcd0ffd6f1ca413f36b6239de7779ae7778e1a200 (diff)
downloadmruby-da749d870f4a57df7a05ef4a9ae023602d48af86.tar.gz
mruby-da749d870f4a57df7a05ef4a9ae023602d48af86.zip
array.c: forgot to adjust tail position in `mrb_ary_splice`.
Diffstat (limited to 'src/array.c')
-rw-r--r--src/array.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/array.c b/src/array.c
index fc3b0a087..c100591eb 100644
--- a/src/array.c
+++ b/src/array.c
@@ -751,6 +751,7 @@ mrb_ary_splice(mrb_state *mrb, mrb_value ary, mrb_int head, mrb_int len, mrb_val
tail = head + len;
if (alen < len || alen < tail) {
len = alen - head;
+ tail = head + len;
}
/* size check */