From fa3d5d5f69667c03b990ac90ac5cc90c0b4fcab3 Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Sun, 5 Jun 2022 16:37:28 +0100 Subject: [PATCH] Avoid processing in ${sg...} when skipping --- src/src/expand.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/src/expand.c b/src/src/expand.c index e59625858..744ab4d0b 100644 --- a/src/src/expand.c +++ b/src/src/expand.c @@ -5894,8 +5894,8 @@ while (*s) case 2: case 3: goto EXPAND_FAILED; } + if (skipping) continue; - /*XXX no handling of skipping? */ /* Compile the regular expression */ if (!(re = pcre2_compile((PCRE2_SPTR)sub[1], PCRE2_ZERO_TERMINATED, @@ -5986,7 +5986,6 @@ while (*s) restore_expand_strings(save_expand_nmax, save_expand_nstring, save_expand_nlength); - if (skipping) continue; break; } -- 2.30.2