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 found this problem while looking for template parts at specific offsets. All items inside a pfp.fields.Array containing Int/Float elements have a _pfp__offset of 0, instead of their actual positions in the parsed stream. It doesn't seems to be the case when the array items are structs.
After investigation, arrays with elements deriving from NumericBase do not add their items to the internal DOM structure but they are created on-demand when requesting the item. The offset for the created item is not explicitly set, which explains the problem.
This seems pretty straightforward to fix. I'll submit a PR later today.
Describe the bug
I found this problem while looking for template parts at specific offsets. All items inside a
pfp.fields.Array
containing Int/Float elements have a_pfp__offset
of0
, instead of their actual positions in the parsed stream. It doesn't seems to be the case when the array items are structs.To Reproduce
Here is a minimal test reproducing the problem:
It fails with:
Expected Behavior
The item's
_pfp__offset
should be set to the offset value of the item inside the parsed stream.The text was updated successfully, but these errors were encountered: