include/std: std::ptr::relative_to_base_section not working anymore (#349)

Fixes #348 

In issue #348 it is stated that the pattern fails to find the variable baseAddress in the parent of the parent of the attribute function. One parent is required to access the variables on the pattern that is using the attribute.

That pattern is used in the pattern that contains baseAddress as a pointer to an array of the children pattern and that seems to require an extra parent level to be added in order to access baseAddress without errors. The fix was tested on an xbe file extracted from an xbox cd rom and while it failed without the fix as stated in issue 348 with the fix it ran to completion without issues.
This commit is contained in:
paxcut
2025-02-16 04:52:01 -07:00
committed by GitHub
parent 71eeed981d
commit 375145e759

View File

@@ -329,7 +329,7 @@ fn relative_to_base(auto pointer) {
}; };
fn relative_to_base_section(auto pointer) { fn relative_to_base_section(auto pointer) {
return -parent.parent.baseAddress; return -parent.parent.parent.baseAddress;
}; };
bitfield LibraryFlags { bitfield LibraryFlags {