ts_51_011: fix select response decoder

The select response decoder is using b2h() wrongly. b2h expects
a bytearray but we call it with an integer. In the following two
lines we try to convert an integer to an integer.

Change-Id: Ib6448d3bd7a0dc7f25e5ee82a42266b3313e2a95
This commit is contained in:
Philipp Maier 2021-10-14 17:55:04 +02:00
parent 80901d6d39
commit 3c309886e9
1 changed files with 3 additions and 3 deletions

View File

@ -937,9 +937,9 @@ def decode_select_response(resp_hex):
file_type = type_of_file_map[resp_bin[6]] if resp_bin[6] in type_of_file_map else resp_bin[6]
ret['file_descriptor']['file_type'] = file_type
if file_type in ['mf', 'df']:
ret['file_characteristics'] = b2h(resp_bin[13])
ret['num_direct_child_df'] = int(resp_bin[14], 16)
ret['num_direct_child_ef'] = int(resp_bin[15], 16)
ret['file_characteristics'] = b2h(resp_bin[13:14])
ret['num_direct_child_df'] = resp_bin[14]
ret['num_direct_child_ef'] = resp_bin[15]
ret['num_chv_unblock_adm_codes'] = int(resp_bin[16])
# CHV / UNBLOCK CHV stats
elif file_type in ['working_ef']: