has_overflow only if value is *not* within limit

This commit is contained in:
Michael Goulet 2023-01-03 01:09:08 +00:00
parent 23b1cc197a
commit b2317a642d

View File

@ -36,7 +36,7 @@ pub(super) fn did_overflow(&self) -> bool {
#[inline]
pub(super) fn has_overflow(&self, depth: usize) -> bool {
self.current_limit.value_within_limit(depth + self.additional_depth)
!self.current_limit.value_within_limit(depth + self.additional_depth)
}
/// Updating the current limit when hitting overflow.