diff --git a/src/SeedSpring.php b/src/SeedSpring.php index 25b2e43..a6a985e 100644 --- a/src/SeedSpring.php +++ b/src/SeedSpring.php @@ -229,7 +229,8 @@ protected function getNonce($increment = 0) $nonce = \chr($ctr & 0xFF) . $nonce; $ctr >>= 8; } - $this->counter += (int) \floor($increment + ($increment % 16) / 16); + $incr = (int) \floor(($increment + ($increment % 16)) / 16); + $this->counter += $incr; return \str_pad($nonce, 16, "\0", STR_PAD_LEFT); } }