[前][次][番号順一覧][スレッド一覧]

ruby-changes:44838

From: nobu <ko1@a...>
Date: Mon, 28 Nov 2016 12:48:40 +0900 (JST)
Subject: [ruby-changes:44838] nobu:r56911 (trunk): insns.def: adjust index type

nobu	2016-11-28 12:48:34 +0900 (Mon, 28 Nov 2016)

  New Revision: 56911

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=56911

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

  Modified files:
    trunk/insns.def
Index: insns.def
===================================================================
--- insns.def	(revision 56910)
+++ insns.def	(revision 56911)
@@ -758,7 +758,7 @@ checkmatch https://github.com/ruby/ruby/blob/trunk/insns.def#L758
     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;

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]