Fix no_std feature.

This commit is contained in:
Stephen Chung
2020-07-31 12:40:16 +08:00
parent cb005506e2
commit 49392d57d7
2 changed files with 2 additions and 3 deletions

View File

@@ -523,14 +523,14 @@ impl Engine {
state: &mut State,
lib: &Module,
script_expr: &Dynamic,
level: usize,
_level: usize,
) -> Result<Dynamic, Box<EvalAltResult>> {
self.inc_operations(state)?;
// Check for stack overflow
#[cfg(not(feature = "no_function"))]
#[cfg(not(feature = "unchecked"))]
if level > self.limits.max_call_stack_depth {
if _level > self.limits.max_call_stack_depth {
return Err(Box::new(
EvalAltResult::ErrorStackOverflow(Position::none()),
));