diff --git a/lib/fieldio.py b/lib/fieldio.py index d5fd796..4fa4688 100644 --- a/lib/fieldio.py +++ b/lib/fieldio.py @@ -60,7 +60,9 @@ def printLimeHeaders(file): next = (size+7)//8*8 else: data = f.read(size) - data = data[:data.find(b'\0')] + s = data.find(b'\0') + if s>0: + data = data[:s] print(f'* DATA: {data}') next = 7-(size+7)%8 # print(f'next: {next}')