From 7ba2428de5980fa70a4732c21386673fa012b13f Mon Sep 17 00:00:00 2001 From: Vadim Yanitskiy Date: Thu, 27 Feb 2020 00:04:13 +0700 Subject: [PATCH] utils: fix dec_msisdn(): properly detect international numbers We should match the whole value of ToN, not just one LSB bit. Change-Id: Idc51f09b3420d827a75a1161372e4e97c3ddfbc1 --- pySim/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pySim/utils.py b/pySim/utils.py index 8420b23d..c0983847 100644 --- a/pySim/utils.py +++ b/pySim/utils.py @@ -295,7 +295,7 @@ def dec_msisdn(ef_msisdn): msisdn = swap_nibbles(b2h(msisdn_lhv[2:][:bcd_len])).rstrip('f') # International number 10.5.118/3GPP TS 24.008 - if (ton & 0x01) == 0x01: + if ton == 0x01: msisdn = '+' + msisdn return (npi, ton, msisdn)