summaryrefslogtreecommitdiff
path: root/array.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-08-11 05:57:11 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-08-11 05:57:11 +0000
commit0a8a321558e94c96ed03bbab1bd2048a81f52eb1 (patch)
treecf2276d332891fe02a793c266d5a1df778d08195 /array.c
parentc7dc6a34b50e4d9d76c1fe9d2888ccb2aa6aeef3 (diff)
array.c: fix buffer size
* array.c (rb_ary_repeated_permutation): fix buffer size, ALLOCV_N already multiplies element size. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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);