glsl2: Fix stack smash when ternary selection is used.
authorAras Pranckevicius <aras@unity3d.com>
Thu, 29 Jul 2010 12:35:22 +0000 (15:35 +0300)
committerEric Anholt <eric@anholt.net>
Sat, 31 Jul 2010 19:00:01 +0000 (12:00 -0700)
src/glsl/ast_to_hir.cpp

index 9591d36de8ea66ad1e6bcc0bd4d41ff3fd4a7bd6..3522f55aacd783602c18198e751b2bbfc4720b0c 100644 (file)
@@ -658,7 +658,7 @@ ast_expression::hir(exec_list *instructions,
       -1,               /* ast_sequence doesn't convert to ir_expression. */
    };
    ir_rvalue *result = NULL;
-   ir_rvalue *op[2];
+   ir_rvalue *op[3];
    const struct glsl_type *type = glsl_type::error_type;
    bool error_emitted = false;
    YYLTYPE loc;