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

This commit is contained in:
Ermal Lui 2010-02-10 19:27:44 +00:00
parent f48ddade4b
commit 7ec341cbc3

View File

@ -323,7 +323,7 @@ function voucher_used_count($roll) {
for ($i = 1; $i <= $max; $i++) {
// check if ticket already used or not.
$pos = $i >> 3; // divide by 8 -> octet
$mask = 1 << (($i % 8)-1); // mask to test bit in octet
$mask = 1 << ($i % 8); // mask to test bit in octet
if (ord($bitstring[$pos]) & $mask)
$used++;
}