From 42a81ce6b5ad754612427ed901ac2316660a4910 Mon Sep 17 00:00:00 2001 From: Matthias Gilch Date: Mon, 29 Aug 2016 12:10:54 +0200 Subject: [PATCH] Fix IndexError When multimon can't decode the full ZVEI there's an IndexError thrown. This is a small fix for this issue. --- includes/decoders/zvei.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/decoders/zvei.py b/includes/decoders/zvei.py index ce6e9e2..c89b7ed 100644 --- a/includes/decoders/zvei.py +++ b/includes/decoders/zvei.py @@ -31,7 +31,7 @@ def removeF(zvei): """ if "F" in zvei: zvei_old = zvei - for i in range(1, 5): + for i in range(1, len(zvei_old)): if zvei[i] == "F": zvei = zvei.replace("F",zvei[i-1],1) logging.debug("resolve F: %s -> %s", zvei_old, zvei)