diff --git a/decocare/cgm/__init__.py b/decocare/cgm/__init__.py index 38d0c3e..3233a2d 100644 --- a/decocare/cgm/__init__.py +++ b/decocare/cgm/__init__.py @@ -152,6 +152,11 @@ def decode (self): prefix_records = [] for B in iter(lambda: self.stream.read(1), ""): B = bytearray(B) + + # eat nulls within the page to avoid 0-value sgv records + if B[0] == 0x00: + continue + record = self.suggest(B[0]) record['_tell'] = self.stream.tell( ) # read packet if needed