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:
@@ -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);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
8
ext/standard/tests/strings/bug36306.phpt
Normal file
8
ext/standard/tests/strings/bug36306.phpt
Normal file
@@ -0,0 +1,8 @@
|
||||
--TEST--
|
||||
Bug #36306 crc32() 64bit
|
||||
--FILE--
|
||||
<?php
|
||||
echo crc32("platform independant") . "\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
-858128794
|
||||
Reference in New Issue
Block a user