Remove old TODOs from BinaryStreamExtensions, they're not relevant.

This commit is contained in:
Ray Koopa 2020-07-03 21:09:19 +02:00
parent b44ae666b6
commit 420810fad2

View File

@ -43,7 +43,6 @@ namespace Syroot.Worms.IO
/// <returns>The read string.</returns>
public static string ReadFixedString(this BinaryStream self, int length)
{
// TODO: This may not work with multi-byte encodings.
// Ensure to not try to decode any bytes after the 0 termination.
byte[] bytes = self.ReadBytes(length);
for (length = 0; length < bytes.Length && bytes[length] != 0; length++) ;
@ -105,7 +104,6 @@ namespace Syroot.Worms.IO
/// <param name="length">The number of bytes the fixed-size block takes.</param>
public static void WriteFixedString(this BinaryStream self, string value, int length)
{
// TODO: This may not work with multi-byte encodings.
byte[] bytes = new byte[length];
if (value != null)
self.Encoding.GetBytes(value, 0, value.Length, bytes, 0);