summaryrefslogtreecommitdiffhomepage
path: root/src/value_array.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/value_array.h')
-rw-r--r--src/value_array.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/value_array.h b/src/value_array.h
index bc5f28b06..6089b8aa0 100644
--- a/src/value_array.h
+++ b/src/value_array.h
@@ -6,6 +6,7 @@
static inline void
value_move(mrb_value *s1, const mrb_value *s2, size_t n)
{
+ if (n == 0) return;
if (s1 > s2 && s1 < s2 + n)
{
s1 += n;