Skip to content

Commit

Permalink
Update nbt_net_le_binary_stream.py
Browse files Browse the repository at this point in the history
  • Loading branch information
MFDGaming authored Jun 10, 2021
1 parent 4a13c3b commit 0e5b66c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nbt_utils/utils/nbt_net_le_binary_stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ def write_long_tag(self, value: int) -> None:
self.write_signed_var_long(value)

def read_string_tag(self) -> str:
return self.read(self.read_int_tag()).decode()
return self.read(self.read_var_int()).decode()

def write_string_tag(self, value: str) -> None:
self.write_int_tag(len(value))
self.write_var_int(len(value))
self.write(value.encode())

0 comments on commit 0e5b66c

Please sign in to comment.