From 00d4393af49a5d9a283ae53eaf40545e124adb7e Mon Sep 17 00:00:00 2001 From: merlokk <807634+merlokk@users.noreply.github.com> Date: Thu, 3 Jan 2019 19:43:01 +0200 Subject: [PATCH] tlv_get_uint8 --- client/emv/emvcore.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/emv/emvcore.c b/client/emv/emvcore.c index bc2fa1a1a..80affb6c1 100644 --- a/client/emv/emvcore.c +++ b/client/emv/emvcore.c @@ -381,8 +381,8 @@ int EMVSearchPSE(EMVCommandChannel channel, bool ActivateField, bool LeaveFieldO if (t) { struct tlvdb *tsfi = tlvdb_find_path(t, (tlv_tag_t[]){0x6f, 0xa5, 0x88, 0x00}); if (tsfi) { - const struct tlv *tsfi_tlv = tlvdb_get_tlv(tsfi); - uint8_t sfin = tsfi_tlv->value[0]; + uint8_t sfin = 0; + tlv_get_uint8(tlvdb_get_tlv(tsfi), &sfin); PrintAndLogEx(INFO, "* PPSE get SFI: 0x%02x.", sfin); for (uint8_t ui = 0x01; ui <= 0x10; ui++) {