summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Net/OpenID/CryptUtil.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/Net/OpenID/CryptUtil.php b/Net/OpenID/CryptUtil.php
index 6d2a193..b868985 100644
--- a/Net/OpenID/CryptUtil.php
+++ b/Net/OpenID/CryptUtil.php
@@ -161,7 +161,7 @@ class Net_OpenID_CryptUtil {
$bytes = array();
- while ($long) {
+ while ($lib->cmp($long, 0) > 0) {
array_unshift($bytes, $lib->mod($long, 256));
$long = $lib->div($long, pow(2, 8));
}