allow zero-length ascii strings
klayout sometimes writes these
This commit is contained in:
parent
288952f961
commit
34a334f6f3
@ -56,7 +56,7 @@ def parse_real8(data: bytes) -> numpy.ndarray:
|
||||
|
||||
def parse_ascii(data: bytes) -> bytes:
|
||||
if len(data) == 0:
|
||||
raise KlamathError(f'Received empty ascii data.')
|
||||
return b''
|
||||
if data[-1:] == b'\0':
|
||||
return data[:-1]
|
||||
return data
|
||||
|
Loading…
Reference in New Issue
Block a user