]> granicus.if.org Git - onig/commitdiff
fix: invalid loop counter in setup_ext_callout_list_values()
authorK.Kosako <kosako@sofnec.co.jp>
Tue, 6 Mar 2018 05:02:02 +0000 (14:02 +0900)
committerK.Kosako <kosako@sofnec.co.jp>
Tue, 6 Mar 2018 05:02:02 +0000 (14:02 +0900)
src/regparse.c

index 14978fd6c8809fe81d5aa62271cc661bc2699a8a..24dc5164cd5cc359f06c81f98f1d7c209ae75115 100644 (file)
@@ -1707,7 +1707,7 @@ setup_ext_callout_list_values(regex_t* reg)
                     (st_data_t )ext);
   }
 
-  for (i = 0; i < ext->callout_num; i++) {
+  for (i = 1; i <= ext->callout_num; i++) {
     CalloutListEntry* e = ext->callout_list + i;
     if (e->of == ONIG_CALLOUT_OF_NAME) {
       for (j = 0; j < e->u.arg.num; j++) {