From 8a8dfced91660afe816fa010a351aec2349fbd5a Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Mon, 1 Jun 2009 18:11:12 -0500 Subject: [PATCH] Calculation for UCS2 cases was wrong --- src/smsutil.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/smsutil.c b/src/smsutil.c index 4da9360..f7e25ba 100644 --- a/src/smsutil.c +++ b/src/smsutil.c @@ -109,7 +109,6 @@ int ud_len_in_octets(guint8 ud_len, guint8 dcs) { int len_7bit = (ud_len + 1) * 7 / 8; int len_8bit = ud_len; - int len_16bit = ud_len * 2; guint8 upper; if (dcs == 0) @@ -129,7 +128,7 @@ int ud_len_in_octets(guint8 ud_len, guint8 dcs) case 1: return len_8bit; case 2: - return len_16bit; + return len_8bit; } return 0; @@ -141,7 +140,7 @@ int ud_len_in_octets(guint8 ud_len, guint8 dcs) case 1: return len_7bit; case 2: - return len_16bit; + return len_8bit; case 3: if (dcs & 0x4) return len_8bit; -- 2.7.4