diff --git a/src/Binary.php b/src/Binary.php index d27b650..1745570 100644 --- a/src/Binary.php +++ b/src/Binary.php @@ -388,7 +388,7 @@ public static function writeLLong(int $value) : string{ * @throws BinaryDataException */ public static function readVarInt(string $buffer, int &$offset) : int{ - return bedrockbuf_writeVarInt($buffer, $offset, true) ?? throw new BinaryDataException("Failed to read VarInt"); + return bedrockbuf_readVarInt($buffer, $offset, true) ?? throw new BinaryDataException("Failed to read VarInt"); } /**