Skip to content

Commit 8617d73

Browse files
committed
fix mishandling of ^ inside an expression
kokke/tiny-regex-c/pull/61
1 parent d95b944 commit 8617d73

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/re.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,7 @@ static int matchone(regex_t p, char c) {
338338
case NOT_ALPHA: return !matchalphanum(c);
339339
case WHITESPACE: return matchwhitespace(c);
340340
case NOT_WHITESPACE: return !matchwhitespace(c);
341+
case BEGIN: return 0;
341342
default: return (p.u.ch == c);
342343
}
343344
}

0 commit comments

Comments
 (0)