mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/PCK-Studio.git
synced 2026-06-24 00:55:35 +00:00
Add Unicode detection in StreamDataReader
This commit is contained in:
@@ -17,7 +17,7 @@ namespace PckStudio.Classes.Utils
|
||||
|
||||
protected static string ReadString(Stream stream, int length, Encoding encoding)
|
||||
{
|
||||
byte[] buffer = ReadBytes(stream, length);
|
||||
byte[] buffer = ReadBytes(stream, length << Convert.ToInt32(encoding is UnicodeEncoding));
|
||||
return encoding.GetString(buffer);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user