Skip to content

Commit

Permalink
Merge pull request #23 from MartinK84/fix_pmu_weird_sequence
Browse files Browse the repository at this point in the history
Fixed PMU loading crashing twix parsing for weird sequence
  • Loading branch information
pehses authored Apr 29, 2024
2 parents f019a83 + 9de7345 commit 1a27fb7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion twixtools/pmu.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ def __init__(self, data):
self.trigger = dict()
while i < len(data):
magic, = struct.unpack('I', data[i:i+4])
key = magic_pmu[magic]
if magic in magic_pmu:
key = magic_pmu[magic]
else:
key = "UNKNOWN"
i += 4
if key == 'END':
break
Expand Down

0 comments on commit 1a27fb7

Please sign in to comment.