* lib/regexec.c (update_regs): Move comment. --- ChangeLog | 3 +++ lib/regexec.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog index d838ad0d0..70e357884 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2021-02-05 Paul Eggert <egg...@cs.ucla.edu> + 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 424bc8d15..6309deac8 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; -- 2.27.0