summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2010-05-14 16:06:41 -0700
committerIan Romanick <ian.d.romanick@intel.com>2010-05-14 16:07:04 -0700
commit2384937835c1cfbce8c6361ad0972761e17ae1a7 (patch)
tree61f61da7976f08b382410187c6c845e55833abf2
parent2b97dc657a0e762bc67216405419cd348eb948c0 (diff)
Fix function call parameter printer to omit extraneous leading commasimple_list_die_die_die
The output of all test cases was verified to be the same using diff.
-rw-r--r--glsl_parser_extras.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/glsl_parser_extras.cpp b/glsl_parser_extras.cpp
index 985d382..62eeb9c 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();