mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Ticket #350. Correct calculation to be the same as in the voucher_auth.
This commit is contained in:
parent
f48ddade4b
commit
7ec341cbc3
@ -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++;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user