Make limit getters available without unchecked.

This commit is contained in:
Stephen Chung
2022-10-04 15:33:51 +08:00
parent e8fd965eba
commit 891214470b
11 changed files with 87 additions and 37 deletions

View File

@@ -67,7 +67,6 @@ impl Engine {
self.inc_operations(&mut global.num_operations, pos)?;
// Check for stack overflow
#[cfg(not(feature = "unchecked"))]
if level > self.max_call_levels() {
return Err(ERR::ErrorStackOverflow(pos).into());
}