[Mesa-dev] [PATCH] AST dump: fixed printing of conditionals.
Brian Paul
brianp at vmware.com
Fri Jun 3 10:07:41 PDT 2011
On 06/03/2011 11:02 AM, Paul Berry wrote:
> 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:
Committed. Thanks.
-Brian
More information about the mesa-dev
mailing list