initialize the new field properly

This commit is contained in:
Bill Currie 2003-08-01 02:43:51 +00:00
parent 0361cb261f
commit 24f4bcfebf
1 changed files with 1 additions and 1 deletions

View File

@ -86,7 +86,7 @@ new_struct_field (struct_t *strct, type_t *type, const char *name,
if (!strct)
return 0;
field = malloc (sizeof (struct_field_t));
field = calloc (sizeof (struct_field_t), 1);
field->visibility = visibility;
if (name)
field->name = save_string (name);