From: K.Kosako Date: Tue, 13 Mar 2018 09:04:49 +0000 (+0900) Subject: fix: index of callout list entry is callout num - 1 X-Git-Tag: v6.8.0~15 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a86118fdd538d4355d746536a448e94eba887783;p=onig fix: index of callout list entry is callout num - 1 --- diff --git a/src/regparse.c b/src/regparse.c index 548af15..5e1012c 100644 --- a/src/regparse.c +++ b/src/regparse.c @@ -1707,9 +1707,11 @@ typedef intptr_t CalloutTagVal; static int i_callout_callout_list_set(UChar* key, CalloutTagVal e, void* arg) { + int num; RegexExt* ext = (RegexExt* )arg; - ext->callout_list[e].flag |= CALLOUT_TAG_LIST_FLAG_TAG_EXIST; + num = (int )e - 1; + ext->callout_list[num].flag |= CALLOUT_TAG_LIST_FLAG_TAG_EXIST; return ST_CONTINUE; }