fix edge case with word condt

This commit is contained in:
Kyryl Melekhin
2021-09-18 09:49:29 +00:00
parent e4e5c3aa97
commit cc17c0bb05
2 changed files with 5 additions and 1 deletions

3
pike.c
View File

@@ -513,7 +513,8 @@ for (j = 0; j < nsubp; j++) s1->sub[j] = nsub->sub[j]; \
npc += 2; \ npc += 2; \
goto rec##nn; \ goto rec##nn; \
case WBEG: \ case WBEG: \
if ((sp != s && isword(sp)) || !isword(_sp)) \ if (((sp != s || sp != _sp) && isword(sp)) \
|| !isword(_sp)) \
deccheck(nn) \ deccheck(nn) \
npc++; goto rec##nn; \ npc++; goto rec##nn; \
case WEND: \ case WEND: \

View File

@@ -114,6 +114,7 @@ qwerty.*$
(.+)(.+) (.+)(.+)
a(?:b|c|d){4,5}(.) a(?:b|c|d){4,5}(.)
(?:c|d)(?:)(?:a(?:)(?:b)(?:b(?:))(?:b(?:)(?:b))) (?:c|d)(?:)(?:a(?:)(?:b)(?:b(?:))(?:b(?:)(?:b)))
\\\\<abc
" "
input="\ input="\
abcdef abcdef
@@ -229,6 +230,7 @@ abaaa
abcd abcd
acdbcdbe acdbcdbe
cabbbb cabbbb
dabc
" "
expect="\ expect="\
(0,3) (0,3)
@@ -344,6 +346,7 @@ expect="\
(0,4)(0,3)(3,4) (0,4)(0,3)(3,4)
(0,7)(6,7) (0,7)(6,7)
(0,6) (0,6)
-nomatch-
(0,0) (0,0)
" "