You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think struct Kirby doesn't contain a union. Basically, it has to be a union if ObjectBase::kirby1 is really of type struct Kirby *, but actually it's likely capable of pointing to different types based on struct ObjectBase (and, it really makes no sense to make the field a union as it's accessed everywhere).
src/bonus.c:298: obj->base.kirby1 = arg0;
src/object.c:1179: r4->base.kirby1 = r7->base.base.base.parent; // unknown type
src/object.c:1281: r12->base.kirby1 = r4->base.base.base.parent; // unknown type
src/blockin.c:41: arg0->base.kirby1 = sub_0803D368(&arg0->base); // It really returns `struct Kirby *` here.
Fixing the type is easy so I will wait until more code is decompiled to get it more evident.
The text was updated successfully, but these errors were encountered:
jiangzhengwenjz
changed the title
TODO: confirm that struct Kirby is not a union
TODO: confirm that struct Kirby doesn't contain a union
Mar 5, 2022
I think
struct Kirby
doesn't contain a union. Basically, it has to be a union ifObjectBase::kirby1
is really of typestruct Kirby *
, but actually it's likely capable of pointing to different types based onstruct ObjectBase
(and, it really makes no sense to make the field a union as it's accessed everywhere).Fixing the type is easy so I will wait until more code is decompiled to get it more evident.
The text was updated successfully, but these errors were encountered: