summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--glucometerutils/support/lifescan_binary_protocol.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/glucometerutils/support/lifescan_binary_protocol.py b/glucometerutils/support/lifescan_binary_protocol.py
index 1771dcf..4632a94 100644
--- a/glucometerutils/support/lifescan_binary_protocol.py
+++ b/glucometerutils/support/lifescan_binary_protocol.py
@@ -44,7 +44,7 @@ def LifeScanPacket(command_prefix, include_link_control):
'link_control' / link_control_construct,
'command_prefix' / command_prefix_construct,
'message' / construct.Bytes(
- lambda this: len(this.message)),
+ lambda this: this.length - 7),
construct.Const(b'\x03'), # etx
),
),