]> git.rm.cloudns.org Git - xonotic/gmqcc.git/commitdiff
missing initializer
authorWolfgang (Blub) Bumiller <blub@speed.at>
Sun, 19 Aug 2012 16:03:56 +0000 (18:03 +0200)
committerWolfgang (Blub) Bumiller <blub@speed.at>
Sun, 19 Aug 2012 16:03:56 +0000 (18:03 +0200)
ir.c

diff --git a/ir.c b/ir.c
index 3132685eae51c6bfa1c7550f4ca0aa6eac63c29d..713e5df51c4e03ff1b54cbeb85289f03791f43a6 100644 (file)
--- a/ir.c
+++ b/ir.c
@@ -306,6 +306,8 @@ ir_function* ir_function_new(ir_builder* owner, int outtype)
     if (!self)
         return NULL;
 
+    memset(self, 0, sizeof(*self));
+
     self->name = NULL;
     if (!ir_function_set_name(self, "<@unnamed>")) {
         mem_d(self);
@@ -323,6 +325,7 @@ ir_function* ir_function_new(ir_builder* owner, int outtype)
     MEM_VECTOR_INIT(self, locals);
 
     self->code_function_def = -1;
+    self->allocated_locals = 0;
 
     self->run_id = 0;
     return self;