From ae1362544fdeb85425291871b82798e98e724e6d Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Wed, 24 Jan 2018 20:53:21 +0100 Subject: [PATCH] f_enc_IMSI_L3: Fix filler digit in *even* case We actually need to add the filler digit 'F' if the number of digits is even. It is absent when the number of digits is odd. Change-Id: Ic1353f4ea09bba3151636b94a99c8559e0289ffd --- library/L3_Templates.ttcn | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/L3_Templates.ttcn b/library/L3_Templates.ttcn index db514a410..c603b7ba3 100644 --- a/library/L3_Templates.ttcn +++ b/library/L3_Templates.ttcn @@ -47,10 +47,10 @@ private function f_enc_IMSI_L3(hexstring digits) return IMSI_L3 { var integer len := lengthof(digits); if (len rem 2 == 1) { /* modulo remainder */ l3.oddevenIndicator := '1'B; - l3.fillerDigit := '1111'B; + l3.fillerDigit := omit; } else { l3.oddevenIndicator := '0'B; - l3.fillerDigit := omit; + l3.fillerDigit := '1111'B; } l3.digits := digits; return l3;