summaryrefslogtreecommitdiff
path: root/pbx.c
diff options
context:
space:
mode:
authorBJ Weschke <bweschke@btwtech.com>2006-01-13 17:35:12 +0000
committerBJ Weschke <bweschke@btwtech.com>2006-01-13 17:35:12 +0000
commit21796e2569efcf5e882fda5246fdce95ae19ebd2 (patch)
treecdc62ce7e71eb5e595915ebfc9a67e2d52712ba5 /pbx.c
parent46b64889274646bf0acbaf93a693895bf33bca4a (diff)
Another patch against this code (the right one now) to deal with cyclic ranges. #6230
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8059 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'pbx.c')
-rw-r--r--pbx.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pbx.c b/pbx.c
index 38c6e5d5d..7759e141b 100644
--- a/pbx.c
+++ b/pbx.c
@@ -3747,8 +3747,8 @@ static unsigned get_range(char *src, int max, char *const names[], const char *m
e = s;
}
/* Fill the mask. Remember that ranges are cyclic */
- mask = 1 << s; /* last element in case s == e */
- for ( ; s<=e; s++) {
+ mask = 1 << e; /* initialize with last element */
+ for ( ; s != e; s++) {
if (s == max)
s = 0 ;
mask |= (1 << s);