From 97ca6721056723193d8b8fc69aa8dcadb6c38098 Mon Sep 17 00:00:00 2001 From: Justin Date: Sun, 14 Apr 2019 00:18:44 +1000 Subject: [PATCH] Update simple-serialize.md --- specs/simple-serialize.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specs/simple-serialize.md b/specs/simple-serialize.md index 6626b9cf4..b956df4d1 100644 --- a/specs/simple-serialize.md +++ b/specs/simple-serialize.md @@ -85,7 +85,7 @@ assert sum(fixed_lengths + variable_lengths) < 2**(BYTES_PER_LENGTH_OFFSET * BIT # Compute offsets of variable-size parts and interleave offsets with fixed-size parts offsets = [sum(fixed_lengths + variable_lengths[:i]) for i in range(len(value))] -fixed_parts = [part if part != None else offsets[i] for i, part in enumerate(fixed_parts)] +fixed_parts = [part if part != None else serialize(offsets[i]) for i, part in enumerate(fixed_parts)] # Return the fixed-size parts (with offsets interleaved) followed by the variable-size parts return "".join(fixed_parts + variable_parts)