Index: pbx.c =================================================================== --- pbx.c (revision 13633) +++ pbx.c (working copy) @@ -3728,9 +3728,11 @@ } /* Fill the mask. Remember that ranges are cyclic */ mask = 1 << e; /* initialize with last element */ - for ( ; s != e; s++) { - if (s == max) - s = 0 ; + while (s != e) { + if (s >= max) + s = 0; + else + s++; mask |= (1 << s); } return mask;