From a94b2bb2656ec3a27dc256368a37fdd7311d75b9 Mon Sep 17 00:00:00 2001 From: onyx-and-iris <75868496+onyx-and-iris@users.noreply.github.com> Date: Wed, 23 Mar 2022 12:08:08 +0000 Subject: [PATCH] Update dataclass.py split at null terminator --- vbancmd/dataclass.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vbancmd/dataclass.py b/vbancmd/dataclass.py index f2b8fed..af478a6 100644 --- a/vbancmd/dataclass.py +++ b/vbancmd/dataclass.py @@ -109,11 +109,11 @@ class VBAN_VMRT_Packet_Data: @property def striplabels(self) -> tuple: """ returns tuple of strip labels """ - return tuple(self._stripLabelUTF8c60[i:i+60].decode('ascii') for i in range(0, 480, 60)) + return tuple(self._stripLabelUTF8c60[i:i+60].decode('ascii').split('\x00')[0] for i in range(0, 480, 60)) @property 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)) + return tuple(self._busLabelUTF8c60[i:i+60].decode('ascii').split('\x00')[0] for i in range(0, 480, 60)) @dataclass class VBAN_VMRT_Packet_Header: