Skip to content

Commit 0a2201d

Browse files
Merge pull request #54 from Keysight/handle-zero-tag-length
Handle zero tag length
2 parents 41c7bca + eac564a commit 0a2201d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

trsfile/engine/trs.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -533,6 +533,8 @@ def __read_headers(self) -> None:
533533

534534
if (tag_length & 0x80) != 0:
535535
tag_length = int.from_bytes(self.handle.read(tag_length & 0x7F), 'little')
536+
if tag_length == 0 and tag != Header.TRACE_BLOCK.value:
537+
continue
536538

537539
# Obtain the Value
538540
tag_value_index = self.handle.tell()

0 commit comments

Comments
 (0)