Skip to content

Commit

Permalink
Fix test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
plusvic committed Jan 15, 2024
1 parent 79794c4 commit 4d696a9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -582,8 +582,9 @@ static int capture_matches(
yr_string_matches_foreach(context, string, match)
{
if (strlen(f->expected) == match->data_length &&
strncmp(f->expected, (char*) (match->data), match->data_length) ==
0)
(match->data_length == 0 ||
strncmp(f->expected, (char*) (match->data), match->data_length) ==
0))
{
f->found++;
}
Expand Down

0 comments on commit 4d696a9

Please sign in to comment.