]> granicus.if.org Git - onig/commitdiff
fix position of get_callout_name_id_from_name() calling
authorK.Kosako <kosako@sofnec.co.jp>
Fri, 23 Feb 2018 05:38:23 +0000 (14:38 +0900)
committerK.Kosako <kosako@sofnec.co.jp>
Fri, 23 Feb 2018 05:38:23 +0000 (14:38 +0900)
src/regparse.c

index ddc9ed1e3516be58f919ede33d1f9e868aae1421..48180f0ed152a82676cc6f982a91d19aab009072 100644 (file)
@@ -6693,10 +6693,6 @@ parse_callout_of_name(Node** np, int cterm, UChar** src, UChar* end, ScanEnv* en
     }
   }
 
-  is_not_single = 0;
-  r = get_callout_name_id_from_name(enc, is_not_single, name_start, name_end, &name_id);
-  if (r != ONIG_NORMAL) return r;
-
   if (c == '[') {
     if (PEND) return ONIGERR_END_PATTERN_IN_GROUP;
     tag_start = p;
@@ -6717,6 +6713,10 @@ parse_callout_of_name(Node** np, int cterm, UChar** src, UChar* end, ScanEnv* en
     tag_start = tag_end = 0;
   }
 
+  is_not_single = 0;
+  r = get_callout_name_id_from_name(enc, is_not_single, name_start, name_end, &name_id);
+  if (r != ONIG_NORMAL) return r;
+
   in = onig_get_callout_in_from_name_id(name_id);
   max_arg_num = get_callout_arg_num_from_name_id(name_id);
   opt_arg_num = get_callout_opt_arg_num_from_name_id(name_id);