diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2020-08-12 21:47:23 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2020-10-12 16:21:36 +0900 |
| commit | 8813ebec07b4da46bf21a06cd16987208a442991 (patch) | |
| tree | 2cc9213de89a3ac29f8f13e5c62d3e55e49b6916 /src/value_array.h | |
| parent | a93ef815be794a5afdaffd33b896cd64dc5f0a75 (diff) | |
| download | mruby-8813ebec07b4da46bf21a06cd16987208a442991.tar.gz mruby-8813ebec07b4da46bf21a06cd16987208a442991.zip | |
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.
Diffstat (limited to 'src/value_array.h')
| -rw-r--r-- | src/value_array.h | 1 |
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; |
