We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e756544 + d5f1738 commit 8aec1faCopy full SHA for 8aec1fa
LnkParse3/target_factory.py
@@ -74,12 +74,11 @@ def target_class(self):
74
75
# XXX: Move to table
76
try:
77
- if 0x20 < item_type <= 0x2F:
78
- target = classes[0x20]
79
- elif 0x30 < item_type <= 0x3F:
80
- target = classes[0x30]
81
- elif 0x40 < item_type <= 0x4F:
82
- target = classes[0x40]
+ # 0x20, 0x30, and 0x40 should have an 0x70 bitmask applied per
+ # https://github.com/libyal/libfwsi/blob/main/documentation/Windows%20Shell%20Item%20format.asciidoc
+ masked_item_type = item_type & 0x70
+ if masked_item_type in [0x20, 0x30, 0x40]:
+ target = classes[masked_item_type]
83
else:
84
target = classes[item_type]
85
except KeyError:
0 commit comments