diff options
author | David M <davidmj@users.sourceforge.net> | 2006-03-10 05:35:23 +0000 |
---|---|---|
committer | David M <davidmj@users.sourceforge.net> | 2006-03-10 05:35:23 +0000 |
commit | 2fb1507670ba4582a1170c0346ef735358545a53 (patch) | |
tree | 9e713d4c1ff24d8ebf231877596444d1fe110ddf /phpBB/includes/ucp/ucp_confirm.php | |
parent | 678ea0449783897eff7b8572ad55f8c9ffe18895 (diff) | |
download | forums-2fb1507670ba4582a1170c0346ef735358545a53.tar forums-2fb1507670ba4582a1170c0346ef735358545a53.tar.gz forums-2fb1507670ba4582a1170c0346ef735358545a53.tar.bz2 forums-2fb1507670ba4582a1170c0346ef735358545a53.tar.xz forums-2fb1507670ba4582a1170c0346ef735358545a53.zip |
- ord() always returns a unsigned integer, no need to force it positive
git-svn-id: file:///svn/phpbb/trunk@5618 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/ucp/ucp_confirm.php')
-rw-r--r-- | phpBB/includes/ucp/ucp_confirm.php | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/phpBB/includes/ucp/ucp_confirm.php b/phpBB/includes/ucp/ucp_confirm.php index 92f7512baf..68e949799b 100644 --- a/phpBB/includes/ucp/ucp_confirm.php +++ b/phpBB/includes/ucp/ucp_confirm.php @@ -216,15 +216,12 @@ class ucp_confirm // We can defer the modulo operation: // s1 maximally grows from 65521 to 65521 + 255 * 3800 // s2 maximally grows by 3800 * median(s1) = 2090079800 < 2^31 - $n = 3800; - if ($n > $temp_len) - { - $n = $temp_len; - } + $n = ($temp_len < 3800) ? $temp_len : 3800; + $temp_len -= $n; while (--$n >= 0) { - $s1 += (ord($raw_image[$i++]) & 255); + $s1 += ord($raw_image[$i++]); $s2 += $s1; } $s1 %= 65521; |