don't seg on null field names

This commit is contained in:
Bill Currie 2004-02-13 23:08:22 +00:00
parent 4cabb40303
commit efb52dc9f9

View file

@ -163,9 +163,11 @@ struct_compare_fields (struct_t *s1, struct_t *s2)
struct_field_t *f2 = s2->struct_head;
while (f1 && f2) {
if (strcmp (f1->name, f2->name)
|| f1->type != f2->type)
return 0;
if (f1->name != f2->name)
if (!f1->name || !f2->name
|| strcmp (f1->name, f2->name)
|| f1->type != f2->type)
return 0;
f1 = f1->next;
f2 = f2->next;
}