Skip to content

Commit

Permalink
fix: 修复了对非ASCII字符的支持
Browse files Browse the repository at this point in the history
  • Loading branch information
vaaandark committed Sep 1, 2022
1 parent 564394d commit a0632ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/irregex.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ static int regex_execute_rec(NFANode *n, const char *pos, bool *matched,
if (e->is_epsilon) {
res = regex_execute_rec(e->next, pos, matched, last_visited_pos);
} else {
if (e->ch[(int)*pos]) {
if (e->ch[((int)*pos + 256) % 256]) {
res = 1 + regex_execute_rec(e->next, pos + 1, matched,
last_visited_pos);
}
Expand Down

0 comments on commit a0632ff

Please sign in to comment.