mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-07 18:38:02 +00:00
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
This commit is contained in:
4
pbx.c
4
pbx.c
@@ -3747,8 +3747,8 @@ static unsigned get_range(char *src, int max, char *const names[], const char *m
|
|||||||
e = s;
|
e = s;
|
||||||
}
|
}
|
||||||
/* Fill the mask. Remember that ranges are cyclic */
|
/* Fill the mask. Remember that ranges are cyclic */
|
||||||
mask = 1 << s; /* last element in case s == e */
|
mask = 1 << e; /* initialize with last element */
|
||||||
for ( ; s<=e; s++) {
|
for ( ; s != e; s++) {
|
||||||
if (s == max)
|
if (s == max)
|
||||||
s = 0 ;
|
s = 0 ;
|
||||||
mask |= (1 << s);
|
mask |= (1 << s);
|
||||||
|
|||||||
Reference in New Issue
Block a user