1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

insns.def: adjust index type

* insns.def (checkmatch): adjust type of the index variable, to
  get rid of (potential) overflow.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56911 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2016-11-28 03:48:34 +00:00
parent 8e7e71d63e
commit bd2fd73196

View file

@ -758,7 +758,7 @@ checkmatch
result = Qfalse;
if (flag & VM_CHECKMATCH_ARRAY) {
int i;
long i;
for (i = 0; i < RARRAY_LEN(pattern); i++) {
if (RTEST(check_match(RARRAY_AREF(pattern, i), target, checkmatch_type))) {
result = Qtrue;