From 06f0534d653f6f5f57acabad1f017457fe3d924b Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Sun, 22 Jan 2017 11:24:55 +0000 Subject: [PATCH] Fixed wrong encoding of NBT strings, fixed invisible signs issues --- src/pocketmine/nbt/NBT.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pocketmine/nbt/NBT.php b/src/pocketmine/nbt/NBT.php index fcae202f1..9426edbcb 100644 --- a/src/pocketmine/nbt/NBT.php +++ b/src/pocketmine/nbt/NBT.php @@ -593,13 +593,13 @@ class NBT{ } public function getString(bool $network = false){ - $len = $network ? $this->getByte() : $this->getShort(); + $len = $network ? Binary::readUnsignedVarInt($this) : $this->getShort(); return $this->get($len); } public function putString($v, bool $network = false){ if($network === true){ - $this->putByte(strlen($v)); + $this->put(Binary::writeUnsignedVarInt(strlen($v))); }else{ $this->putShort(strlen($v)); }