summaryrefslogtreecommitdiffstats
path: root/etc/inc/voucher.inc
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2010-02-10 19:27:44 +0000
committerErmal Luçi <eri@pfsense.org>2010-02-10 19:27:44 +0000
commit7ec341cbc3e4cff4999332c9db44deef533f15b3 (patch)
tree6f0094b4ba2816f27dd25187a4de780c1da12599 /etc/inc/voucher.inc
parentf48ddade4b3bbaba56d6ba00e0472905adfb7233 (diff)
downloadpfsense-7ec341cbc3e4cff4999332c9db44deef533f15b3.zip
pfsense-7ec341cbc3e4cff4999332c9db44deef533f15b3.tar.gz
Ticket #350. Correct calculation to be the same as in the voucher_auth.
Diffstat (limited to 'etc/inc/voucher.inc')
-rw-r--r--etc/inc/voucher.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/etc/inc/voucher.inc b/etc/inc/voucher.inc
index 2db6d19..b348fc1 100644
--- a/etc/inc/voucher.inc
+++ b/etc/inc/voucher.inc
@@ -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++;
}
OpenPOWER on IntegriCloud