remove incorrect unnecessary offset

This commit is contained in:
protolambda 2019-05-02 09:16:01 +02:00
parent 524d7b09ba
commit bbaa1417a8
No known key found for this signature in database
GPG Key ID: EC89FDBB2B4C7623
1 changed files with 1 additions and 1 deletions

View File

@ -163,7 +163,7 @@ def serialize_value(value, typ=None):
return encode_series(value, [typ[0]] * len(value)) return encode_series(value, [typ[0]] * len(value))
# "bytes" (variable size) # "bytes" (variable size)
elif isinstance(typ, str) and typ == 'bytes': elif isinstance(typ, str) and typ == 'bytes':
return (b"\x00" * BYTES_PER_LENGTH_OFFSET) + coerce_to_bytes(value) return coerce_to_bytes(value)
# "bytesN" (fixed size) # "bytesN" (fixed size)
elif isinstance(typ, str) and len(typ) > 5 and typ[:5] == 'bytes': elif isinstance(typ, str) and len(typ) > 5 and typ[:5] == 'bytes':
assert len(value) == int(typ[5:]), (value, int(typ[5:])) assert len(value) == int(typ[5:]), (value, int(typ[5:]))