diff options
author | Vadim Yanitskiy <axilirator@gmail.com> | 2020-02-27 00:04:13 +0700 |
---|---|---|
committer | Vadim Yanitskiy <axilirator@gmail.com> | 2020-02-27 01:54:10 +0700 |
commit | 7ba2428de5980fa70a4732c21386673fa012b13f (patch) | |
tree | d76330f07b3eada63de1fc41ee69e74d13a64bf9 | |
parent | 99affe1529a6f8863275a8f0a7996f7f5bf3ab0b (diff) |
utils: fix dec_msisdn(): properly detect international numbers
We should match the whole value of ToN, not just one LSB bit.
Change-Id: Idc51f09b3420d827a75a1161372e4e97c3ddfbc1
-rw-r--r-- | pySim/utils.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pySim/utils.py b/pySim/utils.py index 8420b23..c098384 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) |