projects
/
PHP-P10.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
some fixes
[PHP-P10.git]
/
Uplink
/
Numerics.class.php
diff --git
a/Uplink/Numerics.class.php
b/Uplink/Numerics.class.php
index 01944dcb9aa6d42776c97e38593287fcc10fefb0..87cb6426f191b65bb67742ef8b96ebf434313ad5 100644
(file)
--- a/
Uplink/Numerics.class.php
+++ b/
Uplink/Numerics.class.php
@@
-50,9
+50,6
@@
class Numerics {
private static $base64charsLength = 64;
public static function intToNum($int, $length) {
private static $base64charsLength = 64;
public static function intToNum($int, $length) {
- //fix a small "bug": normaly 0 = AAAAA but we need 1 = AAAAA
- $int = $int - 1;
-
$numeric = "";
for($pos = $length-1; $pos >= 0; $pos--) {
//current position represents floor($int / ($base64charsLength ^ $pos))
$numeric = "";
for($pos = $length-1; $pos >= 0; $pos--) {
//current position represents floor($int / ($base64charsLength ^ $pos))
@@
-77,10
+74,6
@@
class Numerics {
$int = ($posValue * $base);
$base = $base * self::$base64charsLength;
}
$int = ($posValue * $base);
$base = $base * self::$base64charsLength;
}
-
- //fix a small "bug": normaly 0 = AAAAA but we need 1 = AAAAA
- $int = $int + 1;
-
return $int;
}
return $int;
}