You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using the latest version from Nuget (0.8, .Net 4.6.1) and I got an exception while serializing a string with more than 254 characters:
System.ArgumentOutOfRangeException: Non-negative number required.
Parameter name: count
at System.IO.MemoryStream.Read(Byte[] buffer, Int32 offset, Int32 count)
at Wire.Extensions.StreamEx.ReadString(Stream stream, DeserializerSession session)
at Wire.ValueSerializers.StringSerializer.ReadValue(Stream stream, DeserializerSession session)
Is it related to issue #21?
I was able to replicate the bug with the following code:
[TestMethod]
public void MyTestMethod()
{
byte[] wireBytes;
var wireSerializer = new Wire.Serializer();
using (var ms = new MemoryStream())
{
var obj = new string('c', 1000);
wireSerializer.Serialize(obj, ms);
wireBytes = ms.ToArray();
}
using (var ms = new MemoryStream(wireBytes))
{
wireSerializer.Deserialize(ms);
}
}
The text was updated successfully, but these errors were encountered:
Hi,
I am using the latest version from Nuget (0.8, .Net 4.6.1) and I got an exception while serializing a string with more than 254 characters:
Is it related to issue #21?
I was able to replicate the bug with the following code:
The text was updated successfully, but these errors were encountered: