diff --git a/alarmdecoder/decoder.py b/alarmdecoder/decoder.py index 568de9d..19349ca 100644 --- a/alarmdecoder/decoder.py +++ b/alarmdecoder/decoder.py @@ -294,6 +294,8 @@ class AlarmDecoder(object): :returns: :py:class:`~alarmdecoder.messages.Message` """ + data = data.lstrip('\0') + if data is None: raise InvalidMessageError()