Skip to content
This repository was archived by the owner on Mar 27, 2026. It is now read-only.

Commit bf09743

Browse files
committed
Fix DEC decoding to pad with zeroes
This fixes e.g. rendering of PANs which contain zeros in the middle. See #17.
1 parent 67bd3db commit bf09743

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

emv/util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def from_hex_int(val):
2222
>>> from_hex_int([0x12, 0x34])
2323
1234
2424
"""
25-
return int("".join(["%x" % i for i in val]))
25+
return int("".join(["%02x" % i for i in val]))
2626

2727

2828
def from_hex_date(val):

0 commit comments

Comments
 (0)