From 9aa09861450450db516124c3f80948141c78ea44 Mon Sep 17 00:00:00 2001 From: GameHerobrine Date: Sat, 6 Jul 2024 00:51:08 +0300 Subject: [PATCH] fixed readLong sending warning sometimes --- src/utils/Utils.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/Utils.php b/src/utils/Utils.php index af283412..2131b6e2 100644 --- a/src/utils/Utils.php +++ b/src/utils/Utils.php @@ -637,7 +637,7 @@ class Utils{ } public static function readLong($x, $signed = true){ - return @unpack("J", $x)[1]; //signed is useless since number cant be more than 2^63-1 in php + return strlen($x) < 8 ? 0 : @unpack("J", $x)[1]; //signed is useless since number cant be more than 2^63-1 in php } public static function writeLLong($value){