From f43a4074f239a3547a8cfa374fcdad683cbb68ad Mon Sep 17 00:00:00 2001 From: "K.Kosako" Date: Wed, 28 Feb 2018 13:44:16 +0900 Subject: [PATCH] use onig_get_callout_num_by_callout_args() in builtin callout functions --- src/regexec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/regexec.c b/src/regexec.c index 1a323c5..807cbb0 100644 --- a/src/regexec.c +++ b/src/regexec.c @@ -5304,7 +5304,7 @@ onig_builtin_count(OnigCalloutArgs* args, void* user_data ARG_UNUSED) int is_total; OnigCodePoint count_type; - num = args->num; + num = onig_get_callout_num_by_callout_args(args); r = onig_get_arg_by_callout_args(args, 0, &type, &aval); if (r != ONIG_NORMAL) return r; @@ -5363,7 +5363,7 @@ onig_builtin_max(OnigCalloutArgs* args, void* user_data ARG_UNUSED) (void )onig_check_callout_data_and_clear_old_values(args); - num = args->num; + num = onig_get_callout_num_by_callout_args(args); slot = 0; r = onig_get_callout_data_by_callout_num(args->regex, args->msa->mp, num, slot, &type, &val); -- 2.40.0