trying to fix a weird bug
authorBrendan Hansen <brendan.f.hansen@gmail.com>
Sun, 5 Feb 2023 05:02:34 +0000 (23:02 -0600)
committerBrendan Hansen <brendan.f.hansen@gmail.com>
Sun, 5 Feb 2023 05:02:34 +0000 (23:02 -0600)
compiler/src/types.c

index 86d4b083a82ac02ba6ba6a1327b4a2fd803e1e6b..a510549b0d4783daa706260f51f49ed7000705e8 100644 (file)
@@ -49,6 +49,8 @@ static Table(u64) type_func_map;
 
 static Type* type_create(TypeKind kind, bh_allocator a, u32 extra_type_pointer_count) {
     Type* type = bh_alloc(a, sizeof(Type) + sizeof(Type *) * extra_type_pointer_count);
+    memset(type, 0, sizeof(Type));
+
     type->kind = kind;
     type->ast_type = NULL;
     return type;