diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-08-11 05:57:11 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-08-11 05:57:11 +0000 |
commit | 0a8a321558e94c96ed03bbab1bd2048a81f52eb1 (patch) | |
tree | cf2276d332891fe02a793c266d5a1df778d08195 /array.c | |
parent | c7dc6a34b50e4d9d76c1fe9d2888ccb2aa6aeef3 (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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); |