Skip to content

Commit 4db109f

Browse files
author
Jake Crowley
committed
fix value instances not appearing
1 parent fdc2b10 commit 4db109f

File tree

1 file changed

+7
-5
lines changed
  • src/hobbits-plugins/analyzers/KaitaiStruct/scripts

1 file changed

+7
-5
lines changed

src/hobbits-plugins/analyzers/KaitaiStruct/scripts/runner.py

+7-5
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,15 @@ def parse_struct(struct, sections, prefix="", parent_offset = 0, base_io=None, b
8383
#print(vars(struct))
8484
#print(struct._debug)
8585

86-
for name, info in struct._debug.items():
87-
try:
88-
value = getattr(struct, name)
89-
except:
90-
print(f"Skipping {name}, not an attribute in struct")
86+
for name, value in struct.__dict__.items():
87+
if name in ("_io", "_parent", "_root", "_debug") or name.startswith("_raw_"):
9188
continue
9289

90+
if name in struct._debug:
91+
info = struct._debug[name]
92+
else:
93+
info = {"start": 0, "end": 0}
94+
9395
label = prefix + "." + name if prefix else name
9496
parent_offset = info["start"] + base_offset
9597

0 commit comments

Comments
 (0)