Skip to content

Commit

Permalink
fix #1153 (index error) (#1154)
Browse files Browse the repository at this point in the history
  • Loading branch information
andynoack authored Jan 24, 2025
1 parent 0f9365b commit 2a5604f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/urh/awre/Preprocessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,10 @@ def get_preamble_lengths_from_sync_words(
(pl for pl in preamble_lengths if pl % 4 == 0), None
)
if preamble_length is None:
preamble_length = preamble_lengths[0]
try:
preamble_length = preamble_lengths[0]
except IndexError as e:
preamble_length = 0
result[i] = preamble_length

return result
Expand Down

0 comments on commit 2a5604f

Please sign in to comment.