From 2a5604f7b61a22264ea6290217dd2512fc802c60 Mon Sep 17 00:00:00 2001 From: "Prof. Dr. Andreas Noack" Date: Fri, 24 Jan 2025 11:53:02 +0100 Subject: [PATCH] fix #1153 (index error) (#1154) --- src/urh/awre/Preprocessor.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/urh/awre/Preprocessor.py b/src/urh/awre/Preprocessor.py index 9c65ef0aa..0ec04b525 100644 --- a/src/urh/awre/Preprocessor.py +++ b/src/urh/awre/Preprocessor.py @@ -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