Project

General

Profile

« Previous | Next » 

Revision 7ec341cb

Added by Ermal Luçi over 15 years ago

Ticket #350. Correct calculation to be the same as in the voucher_auth.

View differences:

etc/inc/voucher.inc
323 323
    for ($i = 1; $i <= $max; $i++) {
324 324
        // check if ticket already used or not. 
325 325
        $pos = $i >> 3;            // divide by 8 -> octet
326
        $mask = 1 << (($i % 8)-1);  // mask to test bit in octet
326
        $mask = 1 << ($i % 8);  // mask to test bit in octet
327 327
        if (ord($bitstring[$pos]) & $mask)
328 328
            $used++;
329 329
    }   

Also available in: Unified diff