Closed emesare closed 1 year ago
A hack-solution for now is to use _offsets_
for every nested offset structure.
class NESTED_OFFSET_TEST(Structure):
_fields_ = [("inner", TEST_OFFSETS)]
_offsets_ = [(0x0, "inner_offset", TEST_OFFSETS)] # use this in the mean time
The below snippet fails with
AttributeError: 'TEST_OFFSETS' object has no attribute 'two_offset'
.The root cause of this problem I think is the fact that the
Structure
has special constructor that overrides the__dict__
member withStgDict
containing the fields ONLY in_fields_
, not in_offsets_
(see: 1, 2, 3).