Skip to content
Snippets Groups Projects
Commit 2aa12b1c authored by John Kessenich's avatar John Kessenich
Browse files

HLSL: Address #839: avoid crash by distinguishing between bad argument and no argument.

parent d1141843
No related branches found
No related tags found
No related merge requests found
......@@ -2926,11 +2926,16 @@ bool HlslGrammar::acceptArguments(TFunction* function, TIntermTyped*& arguments)
if (! acceptTokenClass(EHTokLeftParen))
return false;
// RIGHT_PAREN
if (acceptTokenClass(EHTokRightParen))
return true;
// must now be at least one expression...
do {
// expression
TIntermTyped* arg;
if (! acceptAssignmentExpression(arg))
break;
return false;
// hook it up
parseContext.handleFunctionArgument(function, arguments, arg);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment