From cc17c0bb0514c12dd323da886adecdd90c0b66ce Mon Sep 17 00:00:00 2001 From: Kyryl Melekhin Date: Sat, 18 Sep 2021 09:49:29 +0000 Subject: [PATCH] fix edge case with word condt --- pike.c | 3 ++- test.sh | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/pike.c b/pike.c index 33989c5..f619bf5 100644 --- a/pike.c +++ b/pike.c @@ -513,7 +513,8 @@ for (j = 0; j < nsubp; j++) s1->sub[j] = nsub->sub[j]; \ npc += 2; \ goto rec##nn; \ case WBEG: \ - if ((sp != s && isword(sp)) || !isword(_sp)) \ + if (((sp != s || sp != _sp) && isword(sp)) \ + || !isword(_sp)) \ deccheck(nn) \ npc++; goto rec##nn; \ case WEND: \ diff --git a/test.sh b/test.sh index 443e2f5..7c8af63 100755 --- a/test.sh +++ b/test.sh @@ -114,6 +114,7 @@ qwerty.*$ (.+)(.+) a(?:b|c|d){4,5}(.) (?:c|d)(?:)(?:a(?:)(?:b)(?:b(?:))(?:b(?:)(?:b))) +\\\\