mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/PCK-Studio.git
synced 2026-06-01 10:55:24 +00:00
Update StreamDataReader.ReadString to remove null character
This commit is contained in:
@@ -39,7 +39,7 @@ namespace PckStudio.Classes.IO
|
||||
protected static string ReadString(Stream stream, int length, Encoding encoding)
|
||||
{
|
||||
byte[] buffer = ReadBytes(stream, length << Convert.ToInt32(encoding is UnicodeEncoding));
|
||||
return encoding.GetString(buffer);
|
||||
return encoding.GetString(buffer).TrimEnd('\0');
|
||||
}
|
||||
|
||||
protected static byte[] ReadBytes(Stream stream, int count)
|
||||
|
||||
Reference in New Issue
Block a user