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

This commit is contained in:
Pierre Joye 2006-02-07 00:23:55 +00:00
parent a3b941642c
commit f3e11a705c
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