Skip to content

Commit eafb862

Browse files
committed
Catch an rare edge case and raise an error until it is resolved.
1 parent c660195 commit eafb862

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

sc2reader/parsers.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,9 @@ def parse_ability_event(self, buffer, frames, type, code, pid):
129129

130130
return UnknownLocationAbilityEvent(frames, pid, type, code, None)
131131

132+
else:
133+
raise TypeError("Unknown atype & 0x40: flag %X at frame %X" % (flag,frames))
134+
132135
elif atype & 0x80: # right-click on target?
133136
# ability (2), object id (4), object type (2), ?? (10)
134137
ability = buffer.read_byte() << 8 | buffer.read_byte()

0 commit comments

Comments
 (0)