Skip to content

Commit

Permalink
lib.fieldio: no trim if no null bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
jxy committed Oct 11, 2023
1 parent 8fb4c9f commit e943c1f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/fieldio.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}')
Expand Down

0 comments on commit e943c1f

Please sign in to comment.