1
0
mirror of https://github.com/Ne-Lexa/php-zip.git synced 2025-08-29 09:50:40 +02:00

Skipped some tests for php 32-bit platform.

This commit is contained in:
Ne-Lexa
2017-11-14 11:28:02 +03:00
parent 1b1495eee8
commit 0d4b101510
4 changed files with 24 additions and 3 deletions

View File

@@ -54,9 +54,11 @@ class PackUtil
*/
public static function toSignedInt32($int)
{
$int = $int & 0xffffffff;
if (PHP_INT_SIZE === 8 && ($int & 0x80000000)) {
return $int - 0x100000000;
if (PHP_INT_SIZE === 8) {
$int = $int & 0xffffffff;
if ($int & 0x80000000) {
return $int - 0x100000000;
}
}
return $int;
}