Explorar o código

Fix crash regression in the shader function validation

introduced in #41780
Yuri Roubinsky %!s(int64=5) %!d(string=hai) anos
pai
achega
b1351fe781
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      servers/rendering/shader_language.cpp

+ 1 - 1
servers/rendering/shader_language.cpp

@@ -2398,7 +2398,7 @@ bool ShaderLanguage::_validate_function_call(BlockNode *p_block, const Map<Strin
 
 
 		FunctionNode *pfunc = shader->functions[i].function;
 		FunctionNode *pfunc = shader->functions[i].function;
 		if (arg_list == "") {
 		if (arg_list == "") {
-			for (int j = 0; j < args.size(); j++) {
+			for (int j = 0; j < pfunc->arguments.size(); j++) {
 				if (j > 0) {
 				if (j > 0) {
 					arg_list += ", ";
 					arg_list += ", ";
 				}
 				}