]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
initialize the ast_expression node in ast_shallow_type properly as well
authorWolfgang (Blub) Bumiller <blub@speed.at>
Sat, 18 Aug 2012 14:58:17 +0000 (16:58 +0200)
committerWolfgang (Blub) Bumiller <blub@speed.at>
Sat, 18 Aug 2012 14:58:17 +0000 (16:58 +0200)
ast.c

diff --git a/ast.c b/ast.c
index 01e3332132e054caa7b570b7106677931ca3cd84..bca493e606285cf59b8e15ffc56dfe4c861645ab 100644 (file)
--- a/ast.c
+++ b/ast.c
@@ -108,6 +108,7 @@ static ast_value* ast_value_copy(const ast_value *self)
 static ast_expression* ast_shallow_type(lex_ctx ctx, int vtype)
 {
     ast_instantiate(ast_expression, ctx, ast_expression_delete_full);
+    ast_expression_init(self, NULL);
     self->expression.codegen = NULL;
     self->expression.next    = NULL;
     self->expression.vtype   = vtype;