Skip to content

Commit

Permalink
Fix check_recursion_prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
Markus Westerlind authored and Markus Westerlind committed Jul 4, 2022
1 parent 0fa7a8f commit f595267
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/de.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,11 @@ macro_rules! if_checking_recursion_limit {

macro_rules! check_recursion_prefix {
($self_: ident, $error: path) => {
$self_.remaining_depth -= 1;
if $self_.remaining_depth == 0 {
return $error($self_.error(ErrorCode::RecursionLimitExceeded));
if_checking_recursion_limit! {
$self_.remaining_depth -= 1;
if $self_.remaining_depth == 0 {
return $error($self_.error(ErrorCode::RecursionLimitExceeded));
}
}
};
}
Expand Down

0 comments on commit f595267

Please sign in to comment.