diff options
Diffstat (limited to 'include/ruby/internal/memory.h')
-rw-r--r-- | include/ruby/internal/memory.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/ruby/internal/memory.h b/include/ruby/internal/memory.h index 270cc1ac8b..64e850c65e 100644 --- a/include/ruby/internal/memory.h +++ b/include/ruby/internal/memory.h @@ -643,7 +643,7 @@ rbimpl_size_mul_or_raise(size_t x, size_t y) static inline void * rb_alloc_tmp_buffer2(volatile VALUE *store, long count, size_t elsize) { - const size_t total_size = rbimpl_size_mul_or_raise(count, elsize); + const size_t total_size = rbimpl_size_mul_or_raise(RBIMPL_CAST((size_t)count), elsize); const size_t cnt = (total_size + sizeof(VALUE) - 1) / sizeof(VALUE); return rb_alloc_tmp_buffer_with_count(store, total_size, cnt); } |