From c559aa42f66d84b154b805c2401c7d217dc158b8 Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Wed, 9 Sep 2009 21:24:39 -0500 Subject: [PATCH] Make cbs_topic_ranges_to_string work with all ids --- src/smsutil.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/smsutil.c b/src/smsutil.c index 4e7d9f07..2ebc9fd4 100644 --- a/src/smsutil.c +++ b/src/smsutil.c @@ -3602,7 +3602,13 @@ static inline int element_length(unsigned short element) if (element <= 99) return 2; - return 3; + if (element <= 999) + return 3; + + if (element <= 9999) + return 4; + + return 5; } static inline int range_length(struct cbs_topic_range *range)