Swap endianness

This commit is contained in:
Henryk Plötz 2018-12-05 17:22:13 +01:00 committed by László Károlyi
parent 2063a04f31
commit db02c3ab30
Signed by: karolyi
GPG key ID: 2DCAF25E55735BFE

View file

@ -210,7 +210,7 @@ class APDUPacket(object):
if blob[pos] == 0xff:
# length field is next two bytes.
# @todo: could be wrong:
length = (blob[pos + 1] << 8) + blob[pos + 2]
length = (blob[pos + 2] << 8) + blob[pos + 1]
pos += 2 # consume 2 bytes.
else:
length = blob[pos]