[Mesa-dev] [PATCH] AST dump: fixed printing of conditionals.
Paul Berry
stereotype441 at gmail.com
Fri Jun 3 10:02:32 PDT 2011
ast_expression::print() had an incorrect index into the subexpressions
array, so (a ? b : c) was being incorrectly rendered as (a ? b : b).
---
src/glsl/glsl_parser_extras.cpp | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/glsl/glsl_parser_extras.cpp b/src/glsl/glsl_parser_extras.cpp
index fce2faa..d9aa300 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:
--
1.7.5.2
More information about the mesa-dev
mailing list