Skip to content

Commit

Permalink
buffered pattern: fix broken continuation when capitalized
Browse files Browse the repository at this point in the history
If capital letters were used in elements of a buffered pattern, pattern
detection would fail and the sequence would not be continued correctly.
  • Loading branch information
ejv2 committed Sep 7, 2022
1 parent 48ae019 commit a437155
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions patt.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,10 @@ buffered_pattern_run(union sample_space samples, int count,

for (i = 0; i < datalen; i++) {
cur = &dataset[i];
if (wcscmp(cur->l, decode) == 0) {
if (wcscasecmp(cur->l, decode) == 0) {
uselong = 1;
break;
} else if (wcscmp(cur->s, decode) == 0) {
} else if (wcscasecmp(cur->s, decode) == 0) {
uselong = 0;
break;
}
Expand Down

0 comments on commit a437155

Please sign in to comment.