ForeverZer0 / SharpNBT

A pure CLS-compliant C# implementation of the Named Binary Tag (NBT) format specification commonly used with Minecraft applications, allowing easy reading/writing streams and serialization to other formats.
MIT License
25 stars 9 forks source link

Fixes incomplete stream reads with .NET 6 #4

Closed Arcus92 closed 2 years ago

Arcus92 commented 2 years ago

This fixes #3 by handling the returned number of read bytes of BaseStream.Read in the TagReader class. A new method ReadToFixSizedBuffer with two overloads was added to ensure that the expected number of bytes are actually read.