From c68300b88da586aa3c7a7e35397cddd9e24c3fd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20J=2E=20Est=C3=A9banez?= Date: Thu, 7 Dec 2017 02:19:56 +0100 Subject: [PATCH] Fix function arg count not considered in VisualScript --- modules/visual_script/visual_script.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/visual_script/visual_script.cpp b/modules/visual_script/visual_script.cpp index bb6c32e9e06..53d93798d91 100644 --- a/modules/visual_script/visual_script.cpp +++ b/modules/visual_script/visual_script.cpp @@ -2047,6 +2047,7 @@ void VisualScriptInstance::create(const Ref &p_script, Object *p_o function.argument_count = func_node->get_argument_count(); function.max_stack += function.argument_count; function.flow_stack_size = func_node->is_stack_less() ? 0 : func_node->get_stack_size(); + max_input_args = MAX(max_input_args, function.argument_count); } //multiple passes are required to set up this complex thing..