From 36edf056b0e532e7764111fa2a4d1f355d98c31d Mon Sep 17 00:00:00 2001 From: "K.Kosako" Date: Wed, 3 Oct 2018 21:42:15 +0900 Subject: [PATCH] fix invalid reference in set_sunday_quick_search_skip_table() --- src/regcomp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/regcomp.c b/src/regcomp.c index 3dfd00c..8e83266 100644 --- a/src/regcomp.c +++ b/src/regcomp.c @@ -4676,8 +4676,8 @@ set_sunday_quick_search_skip_table(regex_t* reg, int case_expand, ONIGENC_CODE_TO_MBC(enc, items[k].code[0], buf); for (j = 0; j < clen; j++) { int z = len - j + (offset - 1); - if (skip[p[j]] > z) - skip[p[j]] = z; + if (skip[buf[j]] > z) + skip[buf[j]] = z; } } } -- 2.40.0