From 8813ebec07b4da46bf21a06cd16987208a442991 Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Wed, 12 Aug 2020 21:47:23 +0900 Subject: Skip array embedding if `MRB_NO_BOXING` and `MRB_32BIT`; fix #4382 On some platforms, `sizeof(mrb_value) > sizeof(void*)*3`, which makes `MRB_ARY_EMBED_LEN_MAX` zero. And zero sized array cause compile errors. --- src/value_array.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/value_array.h') 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; -- cgit v1.2.3