1
0
mirror of https://github.com/php/php-src.git synced 2026-03-28 10:12:18 +01:00

- MFB: #36306, crc32() result differs on 32-bit and 64-bit platforms

This commit is contained in:
Pierre Joye
2006-02-07 00:24:56 +00:00
parent f71a7cb1f4
commit 6a158cf60d
2 changed files with 9 additions and 1 deletions

View File

@@ -38,7 +38,7 @@ PHP_NAMED_FUNCTION(php_if_crc32)
for (len += nr; nr--; ++p) {
CRC32(crc, *p);
}
RETVAL_LONG(~crc);
RETVAL_LONG(~ (long) crc);
}
/* }}} */

View File

@@ -0,0 +1,8 @@
--TEST--
Bug #36306 crc32() 64bit
--FILE--
<?php
echo crc32("platform independant") . "\n";
?>
--EXPECT--
-858128794