diff options
Diffstat (limited to 'src/smsutil.c')
-rw-r--r-- | src/smsutil.c | 8 |
1 files changed, 7 insertions, 1 deletions
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) |