diff --git a/ablescript/src/variables.rs b/ablescript/src/variables.rs index 60487dfe..805c54ef 100644 --- a/ablescript/src/variables.rs +++ b/ablescript/src/variables.rs @@ -184,7 +184,7 @@ impl Value { .sum::() + body.len() as i32 } - Functio::Builtin(b) => b.fn_addr() as _, + Functio::Builtin(b) => (b.fn_addr() + b.arity) as _, Functio::Chain { functios, kind } => { let (lf, rf) = *functios; Value::Functio(lf).into_i32()