ImHex-Patterns icon indicating copy to clipboard operation
ImHex-Patterns copied to clipboard

relative_to_parent doesn't seem to be relative to parent.

Open mjsir911 opened this issue 4 months ago • 1 comments

relative_to_parent == relative_to_pointer.

I verified this by writing my own relative_to_parent that actually works and adding a debug print:

fn relative_to_parent_fixed(u128 address) {
    std::print(addressof(parent) - $);
    return addressof(parent.parent);
};

prints just zeroes

mjsir911 avatar Aug 20 '25 18:08 mjsir911

this is a known problem that seems to add extra parent scopes in places like templates and attribute functions. You can make it work by adding an extra parent but the underlying bug should be fixed instead.

paxcut avatar Aug 20 '25 18:08 paxcut