From a86118fdd538d4355d746536a448e94eba887783 Mon Sep 17 00:00:00 2001 From: "K.Kosako" Date: Tue, 13 Mar 2018 18:04:49 +0900 Subject: [PATCH] fix: index of callout list entry is callout num - 1 --- src/regparse.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; } -- 2.40.0