Reduce max fn call level.

This commit is contained in:
Stephen Chung 2020-10-21 10:10:46 +08:00
parent ce03a4fda5
commit ad60db5bae
2 changed files with 2 additions and 2 deletions

View File

@ -6,7 +6,7 @@ Maximum Call Stack Depth
Limit How Stack Usage by Scripts
-------------------------------
Rhai by default limits function calls to a maximum depth of 128 levels (12 levels in debug build).
Rhai by default limits function calls to a maximum depth of 128 levels (8 levels in debug build).
This limit may be changed via the `Engine::set_max_call_levels` method.

View File

@ -75,7 +75,7 @@ pub type Imports = Vec<(ImmutableString, Module)>;
#[cfg(not(feature = "unchecked"))]
#[cfg(debug_assertions)]
pub const MAX_CALL_STACK_DEPTH: usize = 12;
pub const MAX_CALL_STACK_DEPTH: usize = 8;
#[cfg(not(feature = "unchecked"))]
#[cfg(debug_assertions)]
pub const MAX_EXPR_DEPTH: usize = 32;