summaryrefslogtreecommitdiff
path: root/array.c
diff options
context:
space:
mode:
Diffstat (limited to 'array.c')
-rw-r--r--array.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/array.c b/array.c
index 27b6325aa2..d101d3bb6a 100644
--- a/array.c
+++ b/array.c
@@ -5179,7 +5179,7 @@ rb_ary_repeated_permutation(VALUE ary, VALUE num)
}
else { /* this is the general case */
volatile VALUE t0;
- long *p = ALLOCV_N(long, t0, r * sizeof(long));
+ long *p = ALLOCV_N(long, t0, r);
VALUE ary0 = ary_make_shared_copy(ary); /* private defensive copy of ary */
RBASIC_CLEAR_CLASS(ary0);