mirror of
https://gitlab.com/Syroot/Worms.git
synced 2025-01-27 14:18:00 +03:00
Remove old TODOs from BinaryStreamExtensions, they're not relevant.
This commit is contained in:
parent
b44ae666b6
commit
420810fad2
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user