Skip to content

Commit

Permalink
Fix incorrect error message in range check. (#1725)
Browse files Browse the repository at this point in the history
  • Loading branch information
wxsBSD authored Jun 13, 2022
1 parent 4791157 commit 929af6e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion libyara/grammar.c
Original file line number Diff line number Diff line change
Expand Up @@ -4192,7 +4192,7 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
if ((yyvsp[-3].expression).value.integer > (yyvsp[-1].expression).value.integer)
{
yr_compiler_set_error_extra_info(
compiler, "range lower bound must be greater than upper bound");
compiler, "range lower bound must be less than upper bound");
result = ERROR_INVALID_VALUE;
} else if ((yyvsp[-3].expression).value.integer < 0)
{
Expand Down
2 changes: 1 addition & 1 deletion libyara/grammar.y
Original file line number Diff line number Diff line change
Expand Up @@ -2136,7 +2136,7 @@ range
if ($2.value.integer > $4.value.integer)
{
yr_compiler_set_error_extra_info(
compiler, "range lower bound must be greater than upper bound");
compiler, "range lower bound must be less than upper bound");
result = ERROR_INVALID_VALUE;
} else if ($2.value.integer < 0)
{
Expand Down

0 comments on commit 929af6e

Please sign in to comment.