Skip to content

Commit

Permalink
Merge pull request #1 from kawaway/fix/bytes_len
Browse files Browse the repository at this point in the history
Fixed a bug that caused the binary lenght ot be 20 when generating xid from a string
  • Loading branch information
alexferl authored Oct 5, 2023
2 parents 6e241d9 + 5c32f21 commit 4177596
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion xid/xid.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def _decode(xid: XID, src: bytes, dec=None) -> XID:
else:
dec = DECODING_MAP

id_ = bytearray(ENCODED_LEN)
id_ = bytearray(RAW_LEN)

if len(src) != ENCODED_LEN:
raise InvalidXID()
Expand Down

0 comments on commit 4177596

Please sign in to comment.