Fix seg fault

Check types before accessing typeName.

Fix #2848.
This commit is contained in:
Jeremy Hayes 2021-12-28 15:17:39 -07:00
parent ca13951205
commit 46466be045
5 changed files with 78 additions and 3 deletions

View file

@ -0,0 +1,19 @@
#version 330
struct S
{
float a;
};
float func(S s)
{
return s.a;
}
layout(location = 0) out vec4 o_color;
void main()
{
float c = func(1.0f); // ERROR: no matching function
o_color = vec4(c);
}