mirror of
https://github.com/danog/tg-file-decoder.git
synced 2024-11-30 04:38:58 +01:00
Avoid 32 bit issues
This commit is contained in:
parent
226ddc68dc
commit
36fca79a3d
@ -265,12 +265,15 @@ function fixLong(array &$params, string $field)
|
|||||||
/**
|
/**
|
||||||
* Encode long to string.
|
* Encode long to string.
|
||||||
*
|
*
|
||||||
* @param int|int[] $fields Fields to encode
|
* @param string|int|int[] $fields Fields to encode
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
function packLong($fields): string
|
function packLong($fields): string
|
||||||
{
|
{
|
||||||
|
if (\is_string($fields)) { // Already encoded, we hope
|
||||||
|
return $fields;
|
||||||
|
}
|
||||||
if (PHP_INT_SIZE === 8) {
|
if (PHP_INT_SIZE === 8) {
|
||||||
return \pack(LONG, $fields);
|
return \pack(LONG, $fields);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user