summaryrefslogtreecommitdiff
path: root/main/pbx.c
diff options
context:
space:
mode:
authorTilghman Lesher <tilghman@meg.abyt.es>2009-05-14 16:22:14 +0000
committerTilghman Lesher <tilghman@meg.abyt.es>2009-05-14 16:22:14 +0000
commit5a3797643c7e635fcf5b73b92648aeeb606e9b97 (patch)
tree9b278fd563083dccd806c8a030e4f6280a9f32bd /main/pbx.c
parent62b4f8a543314e04d5d99c6403581bcc7e3026cf (diff)
If the timing ended on a zero, then we would loop forever.
(closes issue #14983) Reported by: teox Patches: 20090513__issue14983.diff.txt uploaded by tilghman (license 14) Tested by: teox git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@194430 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/pbx.c')
-rw-r--r--main/pbx.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/main/pbx.c b/main/pbx.c
index a0083a0af..2a10e9b00 100644
--- a/main/pbx.c
+++ b/main/pbx.c
@@ -7083,11 +7083,10 @@ static unsigned get_range(char *src, int max, char *const names[], const char *m
/* Fill the mask. Remember that ranges are cyclic */
mask |= (1 << end); /* initialize with last element */
while (start != end) {
- if (start >= max) {
+ mask |= (1 << start);
+ if (++start >= max) {
start = 0;
}
- mask |= (1 << start);
- start++;
}
}
return mask;