We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IBufferWriterExtension.Write method for unmanaged types creates a Span with invalid length:
int length = sizeof(T); Span<byte> span = writer.GetSpan(1);
should be:
int length = sizeof(T); Span<byte> span = writer.GetSpan(length);
That causes System.ArgumentException : The current buffer writer can't contain the requested input data. at runtime.
Leave only one byte of free capacity and write a larger unmanaged type:
using var buffer = new ArrayPoolBufferWriter<byte>(16); var count = buffer.Capacity - 1; for (int i = 0; i < count; i++) { buffer.Write<byte>(0); } buffer.Write(1.0);
It should grow the buffer accordingly.
VS 2022
No response
8.2.2
Yes, I'd like to be assigned to work on this item
The text was updated successfully, but these errors were encountered:
Would it be possible to merge this? At the moment IBufferWriterExtension is unusable because of this bug.
IBufferWriterExtension
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Describe the bug
IBufferWriterExtension.Write method for unmanaged types creates a Span with invalid length:
should be:
That causes System.ArgumentException : The current buffer writer can't contain the requested input data. at runtime.
Steps to reproduce
Leave only one byte of free capacity and write a larger unmanaged type:
Expected behavior
It should grow the buffer accordingly.
IDE and version
VS 2022
IDE version
No response
Nuget packages
Nuget package version(s)
8.2.2
Help us help you
Yes, I'd like to be assigned to work on this item
The text was updated successfully, but these errors were encountered: