HLSL: Fix #1903 Catch 0-argument case to constructors.
This commit is contained in:
parent
e4e56bcf86
commit
54c72c6d24
1 changed files with 5 additions and 0 deletions
|
|
@ -3221,6 +3221,11 @@ bool HlslGrammar::acceptConstructor(TIntermTyped*& node)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (arguments == nullptr) {
|
||||||
|
expected("one or more arguments");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// hook it up
|
// hook it up
|
||||||
node = parseContext.handleFunctionCall(arguments->getLoc(), constructorFunction, arguments);
|
node = parseContext.handleFunctionCall(arguments->getLoc(), constructorFunction, arguments);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue