Avoid processing in ${sg...} when skipping
authorJeremy Harris <jgh146exb@wizmail.org>
Sun, 5 Jun 2022 15:37:28 +0000 (16:37 +0100)
committerJeremy Harris <jgh146exb@wizmail.org>
Sun, 5 Jun 2022 15:37:28 +0000 (16:37 +0100)
src/src/expand.c

index e59625858c21e8913da2c17aa872fb98c10fa0c7..744ab4d0b934ca4baa4f18a7e1725992a9168148 100644 (file)
@@ -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;
       }