From 2384937835c1cfbce8c6361ad0972761e17ae1a7 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Fri, 14 May 2010 16:06:41 -0700 Subject: [PATCH] Fix function call parameter printer to omit extraneous leading comma The output of all test cases was verified to be the same using diff. --- glsl_parser_extras.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/glsl_parser_extras.cpp b/glsl_parser_extras.cpp index 985d3829e65..62eeb9c8600 100644 --- a/glsl_parser_extras.cpp +++ b/glsl_parser_extras.cpp @@ -326,7 +326,8 @@ ast_expression::print(void) const printf("( "); foreach_list_const (n, &this->expressions) { - printf(", "); + if (n != this->expressions.get_head()) + printf(", "); ast_node *ast = exec_node_data(ast_node, n, link); ast->print(); -- 2.30.2