From c0d19b66636158616ad20143c60f4c5f01a21c5a Mon Sep 17 00:00:00 2001 From: onyx-and-iris <75868496+onyx-and-iris@users.noreply.github.com> Date: Mon, 28 Mar 2022 18:23:46 +0100 Subject: [PATCH] Update dataclass.py --- vbancmd/dataclass.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/vbancmd/dataclass.py b/vbancmd/dataclass.py index 7a2aed0..6f64233 100644 --- a/vbancmd/dataclass.py +++ b/vbancmd/dataclass.py @@ -177,7 +177,7 @@ class VBAN_VMRT_Packet_Data: def striplabels(self) -> tuple: """returns tuple of strip labels""" return tuple( - self._stripLabelUTF8c60[i : i + 60].decode("ascii") + self._stripLabelUTF8c60[i : i + 60].decode("ascii").split("\x00")[0] for i in range(0, 480, 60) ) @@ -185,7 +185,8 @@ class VBAN_VMRT_Packet_Data: def buslabels(self) -> tuple: """returns tuple of bus labels""" return tuple( - self._busLabelUTF8c60[i : i + 60].decode("ascii") for i in range(0, 480, 60) + self._busLabelUTF8c60[i : i + 60].decode("ascii").split("\x00")[0] + for i in range(0, 480, 60) )