From 26b566e19cbfa189a6a158718f21859c0b7ed090 Mon Sep 17 00:00:00 2001 From: Paul Berry Date: Fri, 3 Jun 2011 10:02:32 -0700 Subject: [PATCH] AST dump: fixed printing of conditionals. ast_expression::print() had an incorrect index into the subexpressions array, so (a ? b : c) was being incorrectly rendered as (a ? b : b). Signed-off-by: Brian Paul --- src/glsl/glsl_parser_extras.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/glsl/glsl_parser_extras.cpp b/src/glsl/glsl_parser_extras.cpp index fce2faa758b..d9aa300bbe4 100644 --- a/src/glsl/glsl_parser_extras.cpp +++ b/src/glsl/glsl_parser_extras.cpp @@ -436,7 +436,7 @@ ast_expression::print(void) const printf("? "); subexpressions[1]->print(); printf(": "); - subexpressions[1]->print(); + subexpressions[2]->print(); break; case ast_array_index: -- 2.30.2