diff --git a/src/PocketMinecraftServer.php b/src/PocketMinecraftServer.php index 7792bf600..1c65b23f7 100644 --- a/src/PocketMinecraftServer.php +++ b/src/PocketMinecraftServer.php @@ -220,7 +220,7 @@ class PocketMinecraftServer{ $d .= Utils::writeShort(strlen($data["url"])).$data["url"].(isset($data["timeout"]) ? Utils::writeShort($data["timeout"]) : Utils::writeShort(10)); $d .= Utils::writeShort(count($data["data"])); foreach($data["data"] as $key => $value){ - $d .= Utils::writeInt(strlen($key)).$key . Utils::writeInt(strlen($value)).$value; + $d .= Utils::writeShort(strlen($key)).$key . Utils::writeInt(strlen($value)).$value; } break; default: diff --git a/src/utils/pthreads.php b/src/utils/pthreads.php index ce7c544be..f4b5e2e48 100644 --- a/src/utils/pthreads.php +++ b/src/utils/pthreads.php @@ -74,7 +74,7 @@ class AsyncMultipleQueue extends Thread{ $d = array(); for($c = 0; $c < $cnt; ++$c){ $key = $this->get(Utils::readShort($this->get(2), false)); - $d[$key] = $this->get(Utils::readShort($this->get(2), false)); + $d[$key] = $this->get(Utils::readInt($this->get(2), false)); } $res = (string) Utils::curl_post($url, $d, $timeout); $this->lock();