Skip to content

Commit 375145e

Browse files
authored
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.
1 parent 71eeed9 commit 375145e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

patterns/xbeh.hexpat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ fn relative_to_base(auto pointer) {
329329
};
330330

331331
fn relative_to_base_section(auto pointer) {
332-
return -parent.parent.baseAddress;
332+
return -parent.parent.parent.baseAddress;
333333
};
334334

335335
bitfield LibraryFlags {

0 commit comments

Comments
 (0)