From 97a3f1b32662445223ace30b90def4ddcde70e62 Mon Sep 17 00:00:00 2001 From: GameHerobrine Date: Sat, 7 Oct 2023 06:05:30 +0300 Subject: [PATCH] fixed negative size --- src/Player.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Player.php b/src/Player.php index 152bd7ed..23f25fa4 100755 --- a/src/Player.php +++ b/src/Player.php @@ -294,6 +294,7 @@ class Player{ $sendtime = microtime(true); $size = $this->MTU - 34; + if($size <= 0) return false; $buffer = str_split($packet->buffer, $size); $bigCnt = $this->bigCnt; $this->bigCnt = ($this->bigCnt + 1) % 0x10000;