aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@osmocom.org>2022-02-25 15:16:39 +0100
committerHarald Welte <laforge@osmocom.org>2022-02-25 15:31:16 +0100
commitdd45d8ee3b8d2b26ec969a54276544569b733c10 (patch)
tree69b9a30ae43e1d0272df12809fb685c3bb845859
parent4ebeebffca518a7cc36af8af716d0b0ed9407f0d (diff)
ts_31_102: Fix decoding of UServiceTable
range(0,7) in python is 0..6, and not 0..7, so we need range(0.8) to produce the desired range covering all bits of a byte. This resulted in services 8,16,24,... not being displayed in the decoded output of EF.UST / EF.IST. Change-Id: I22bbc481de342685352bf5b13d54931d3f37f9b7
-rw-r--r--pySim/ts_31_102.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pySim/ts_31_102.py b/pySim/ts_31_102.py
index c6bfa2d..3298534 100644
--- a/pySim/ts_31_102.py
+++ b/pySim/ts_31_102.py
@@ -554,7 +554,7 @@ class EF_UServiceTable(TransparentEF):
ret = {}
for i in range(0, len(in_bin)):
byte = in_bin[i]
- for bitno in range(0, 7):
+ for bitno in range(0, 8):
service_nr = i * 8 + bitno + 1
ret[service_nr] = {
'activated': True if byte & (1 << bitno) else False