TrailingByteArray won't fail on null fields

This commit is contained in:
əlemi 2021-11-24 11:16:20 +01:00
parent 3451cefd5c
commit d1d1eb5ca1

View file

@ -225,7 +225,8 @@ class TrailingByteArray(Type):
@classmethod
def write(cls, data:bytes, buffer:io.BytesIO):
buffer.write(data)
if data:
buffer.write(data)
@classmethod
def read(cls, buffer:io.BytesIO) -> bytes: