From: Paul Eggert Date: Sat, 6 Feb 2021 01:08:45 +0000 (-0800) Subject: regex: fix comment location X-Git-Tag: v1.0~3089 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=a002cbb98b9fb9efc2ca2b1fcc449df5e9283f87;p=gnulib.git regex: fix comment location * lib/regexec.c (update_regs): Move comment. --- diff --git a/ChangeLog b/ChangeLog index d838ad0d01..70e3578844 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2021-02-05 Paul Eggert + regex: fix comment location + * lib/regexec.c (update_regs): Move comment. + regex-tests: add bug 11053 test * tests/test-regex.c (main): New test case for glibc bug 11053. diff --git a/lib/regexec.c b/lib/regexec.c index 424bc8d158..6309deac8b 100644 --- a/lib/regexec.c +++ b/lib/regexec.c @@ -1500,10 +1500,10 @@ update_regs (const re_dfa_t *dfa, regmatch_t *pmatch, } else if (type == OP_CLOSE_SUBEXP) { + /* We are at the last node of this sub expression. */ Idx reg_num = dfa->nodes[cur_node].opr.idx + 1; if (reg_num < nmatch) { - /* We are at the last node of this sub expression. */ if (pmatch[reg_num].rm_so < cur_idx) { pmatch[reg_num].rm_eo = cur_idx;