Compare the base def spaces in def_overlap.

The space field in alias defs is always null and thus aliases would never
overlap the aliased def. Oops.
This commit is contained in:
Bill Currie 2012-12-11 19:51:34 +09:00
parent 998868e53c
commit 045947706e

View file

@ -594,8 +594,15 @@ def_overlap (def_t *d1, def_t *d2)
{
int offs1, size1;
int offs2, size2;
defspace_t *s1 = d1->space;
defspace_t *s2 = d2->space;
if (d1->alias)
s1 = d1->alias->space;
if (d2->alias)
s2 = d2->alias->space;
/// Defs in different spaces never overlap.
if (d1->space != d2->space)
if (s1 != s2)
return 0;
offs1 = d1->offset;