[asterisk-commits] trunk r13709 - /trunk/pbx.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Mon Mar 20 22:48:18 MST 2006
Author: tilghman
Date: Mon Mar 20 23:48:17 2006
New Revision: 13709
URL: http://svn.digium.com/view/asterisk?rev=13709&view=rev
Log:
Bug 6745 - Fix for ranges that wrap around the ends
Modified:
trunk/pbx.c
Modified: trunk/pbx.c
URL: http://svn.digium.com/view/asterisk/trunk/pbx.c?rev=13709&r1=13708&r2=13709&view=diff
==============================================================================
--- trunk/pbx.c (original)
+++ trunk/pbx.c Mon Mar 20 23:48:17 2006
@@ -3728,10 +3728,14 @@
}
/* Fill the mask. Remember that ranges are cyclic */
mask = 1 << e; /* initialize with last element */
- for ( ; s != e; s++) {
- if (s == max)
- s = 0 ;
- mask |= (1 << s);
+ while (s != e) {
+ if (s >= max) {
+ s = 0;
+ mask |= (1 << s);
+ } else {
+ mask |= (1 << s);
+ s++;
+ }
}
return mask;
}
More information about the asterisk-commits
mailing list