glsl2: initialize is_array and array_size of ast_parameter_declarator
authorAras Pranckevicius <aras@unity3d.com>
Mon, 2 Aug 2010 07:22:26 +0000 (10:22 +0300)
committerEric Anholt <eric@anholt.net>
Mon, 2 Aug 2010 17:59:42 +0000 (10:59 -0700)
The non-array path of glsl_parser.ypp wasn't setting is_array to false.

src/glsl/ast.h

index 655054ff6fae404e6645091ecf3eb658bcffb8aa..aa769da3f6579fb9bd35e6a13e44c0026d96282a 100644 (file)
@@ -455,6 +455,12 @@ public:
 
 class ast_parameter_declarator : public ast_node {
 public:
+   ast_parameter_declarator()
+   {
+      this->is_array = false;
+      this->array_size = 0;
+   }
+
    virtual void print(void) const;
 
    virtual ir_rvalue *hir(exec_list *instructions,