mirror of https://gerrit.osmocom.org/pysim
utils: Zero-pad MCC and MNC in enc_plmn()
Change-Id: I94607f6a87a416d05bd577a29d1466452921d604
This commit is contained in:
parent
2322c1f9ff
commit
cc85a1ee71
|
@ -78,7 +78,7 @@ def enc_iccid(iccid):
|
|||
|
||||
def enc_plmn(mcc, mnc):
|
||||
"""Converts integer MCC/MNC into 3 bytes for EF"""
|
||||
return swap_nibbles(lpad('%d' % mcc, 3) + lpad('%d' % mnc, 3))
|
||||
return swap_nibbles(lpad('%03d' % mcc, 3) + lpad('%02d' % mnc, 3))
|
||||
|
||||
def dec_spn(ef):
|
||||
byte1 = int(ef[0:2])
|
||||
|
|
Loading…
Reference in New Issue