# HG changeset patch # User Mychaela Falconia # Date 1613245504 0 # Node ID d4b5a6e547ca3d5c28ebff71c99cd2a1a5ab5db9 # Parent 4c570522de5d7929f151f3695dd4cdb865f24d94 fc-uicc-tool iccid command: same change as in fc-simtool diff -r 4c570522de5d -r d4b5a6e547ca uicc/hlread.c --- a/uicc/hlread.c Sat Feb 13 19:42:14 2021 +0000 +++ b/uicc/hlread.c Sat Feb 13 19:45:04 2021 +0000 @@ -11,7 +11,7 @@ { int rc; unsigned len; - char buf[21]; + char buf[21], *cp; rc = select_op(FILEID_MF); if (rc < 0) @@ -30,7 +30,9 @@ if (rc < 0) return(rc); decode_reversed_nibbles(sim_resp_data, 10, buf); - buf[20] = '\0'; + for (cp = buf + 20; (cp > buf + 1) && (cp[-1] == 'F'); cp--) + ; + *cp = '\0'; printf("%s\n", buf); return(0); }