mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-18 15:01:41 +00:00
don't seg on null strings
This commit is contained in:
parent
9f8d7fbca7
commit
4ee013c5ba
1 changed files with 3 additions and 1 deletions
|
@ -107,7 +107,9 @@ imm_compare (void *_imm1, void *_imm2, void *_tab)
|
|||
hashtab_t **tab = (hashtab_t **) _tab;
|
||||
|
||||
if (tab == &string_imm_defs) {
|
||||
return !strcmp (imm1->i.string_val, imm2->i.string_val);
|
||||
return (imm1->i.string_val == imm2->i.string_val
|
||||
|| (imm1->i.string_val && imm2->i.string_val
|
||||
&& !strcmp (imm1->i.string_val, imm2->i.string_val)));
|
||||
} else if (tab == &float_imm_defs) {
|
||||
return imm1->i.float_val == imm2->i.float_val;
|
||||
} else if (tab == &vector_imm_defs) {
|
||||
|
|
Loading…
Reference in a new issue