diff --git a/mavutil.py b/mavutil.py index 7d014a95e..177d2ae2f 100644 --- a/mavutil.py +++ b/mavutil.py @@ -1571,7 +1571,7 @@ def init_arrays(self, progress_callback=None): b = b[:-1] instance = b.decode('ASCII',errors='ignore').rstrip() else: - instance, = struct.unpack('b', b) + instance, = struct.unpack('b', b[:1]) mname = self.id_to_name[mtype] if mname in self.messages: iname = "%s[%s]" % (mname, str(instance))