mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-29 07:32:02 +00:00
Don't bother creating an alias for a def of the same type.
This commit is contained in:
parent
cc88202f8c
commit
2904c619c1
1 changed files with 2 additions and 0 deletions
|
@ -165,6 +165,8 @@ alias_def (def_t *def, type_t *type, int offset)
|
|||
internal_error (0, "aliasing a def to a larger type");
|
||||
if (offset < 0 || offset + type_size (type) > type_size (def->type))
|
||||
internal_error (0, "invalid alias offset");
|
||||
if (type == def->type)
|
||||
return def;
|
||||
for (alias = def->alias_defs; alias; alias = alias->next) {
|
||||
if (alias->type == type && alias->offset == offset)
|
||||
return alias;
|
||||
|
|
Loading…
Reference in a new issue