Add Unicode detection in StreamDataReader

This commit is contained in:
miku-666
2022-07-21 23:50:04 +02:00
parent 66931beb62
commit eabac8a333
2 changed files with 2 additions and 2 deletions

View File

@@ -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);
}