mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 23:32:09 +00:00
don't seg on null field names
This commit is contained in:
parent
4cabb40303
commit
efb52dc9f9
1 changed files with 5 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue