From 6e663eecb4a488d11b39e4b2663fc138cf9f007c Mon Sep 17 00:00:00 2001 From: Stephen Chung Date: Wed, 29 Jul 2020 23:39:32 +0800 Subject: [PATCH] Fix fn_call. --- src/fn_call.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fn_call.rs b/src/fn_call.rs index 96e81580..ce78d7f6 100644 --- a/src/fn_call.rs +++ b/src/fn_call.rs @@ -893,8 +893,8 @@ impl Engine { &mut scope, &mut mods, state, lib, &mut None, name, fn_def, args, level, ) } - Some(f) => f.get_native_fn()(self, lib, args.as_mut()), Some(f) if f.is_plugin_fn() => f.get_plugin_fn().call(args.as_mut(), Position::none()), + Some(f) => f.get_native_fn()(self, lib, args.as_mut()), None if def_val.is_some() => Ok(def_val.unwrap().into()), None => Err(Box::new(EvalAltResult::ErrorFunctionNotFound( format!(