From: Sławomir Demeszko Date: Thu, 18 Dec 2014 15:12:15 +0000 (+0100) Subject: Fix encoding phone number on sending sms X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=320675a242ace4bc8a4aa33fe0d5ae360119e476;p=oweals%2Fuqmi.git Fix encoding phone number on sending sms Return proper length of encoded phone number with odd count of digits, without this patch number is encoded in memory but length returned by function is not incremented and sms cannot be send. Signed-off-by: SÅ‚awomir Demeszko --- diff --git a/commands-wms.c b/commands-wms.c index 345b812..e3bcbc8 100644 --- a/commands-wms.c +++ b/commands-wms.c @@ -512,7 +512,7 @@ pdu_encode_semioctet(unsigned char *dest, const char *str) str++; } - return len; + return lower ? len : (len + 1); } static int