aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSupreeth Herle <herlesupreeth@gmail.com>2019-11-30 11:00:10 +0100
committerVadim Yanitskiy <axilirator@gmail.com>2020-02-15 03:26:49 +0700
commit2d7859759e66710cfacf3eb446b359788558b0fe (patch)
tree3fe2891d632b8148ccaf41f28769372fda3cf4b0
parent9ca41c1f266a5279283be2d2a144d351f0a3aac7 (diff)
cards: fix reading of EF.HPLMNwAcT in Card.update_hplmn_act()
-rw-r--r--pySim/cards.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pySim/cards.py b/pySim/cards.py
index a49fe43..1552ff1 100644
--- a/pySim/cards.py
+++ b/pySim/cards.py
@@ -76,8 +76,8 @@ class Card(object):
access_tech = 'FFFF' # All technologues selected, even Reserved for Future Use ones
"""
# get size and write EF.HPLMNwAcT
- r = self._scc.select_file(EF['HPLMNwAcT'])
- size = int(r[-1][4:8], 16)
+ data = self._scc.read_binary(EF['HPLMNwAcT'], length=None, offset=0)
+ size = len(data[0])/2
hplmn = enc_plmn(mcc, mnc)
content = hplmn + access_tech
data, sw = self._scc.update_binary(EF['HPLMNwAcT'], content + 'ffffff0000' * (size/5-1))