]> git.tdb.fi Git - libs/gl.git/commitdiff
Don't resolve function call arguments with incorrect types
authorMikko Rasa <tdb@tdb.fi>
Mon, 11 Apr 2022 11:22:48 +0000 (14:22 +0300)
committerMikko Rasa <tdb@tdb.fi>
Mon, 11 Apr 2022 11:37:30 +0000 (14:37 +0300)
source/glsl/resolve.cpp

index 82c0a367dfd2e70f89d04e9b9335cb4df23c2ded..7c58bc6b0fe309b3137e2e10b239601cf5797e8e 100644 (file)
@@ -1101,6 +1101,8 @@ void ExpressionResolver::visit(FunctionCall &call)
                                Compatibility compat = get_compatibility(*param_basic, *arg_basic);
                                if(compat==RIGHT_CONVERTIBLE)
                                        convert_to(call.arguments[i], *param_basic);
+                               else if(compat!=SAME_TYPE)
+                                       return;
                        }
                }
                resolve(call, call.declaration->return_type_declaration, false);