-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
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
Fix FlushAsyncInternal when emitting BOM #52812
Conversation
Tagging subscribers to this area: @carlossanlop |
Update StreamWriter.WriteTests.cs Update StreamWriter.WriteTests.cs
The CI failed, but it doesn't seem to be related to my changes |
Task flushTask = Core(flushStream, flushEncoder, cancellationToken); | ||
|
||
_charPos = 0; | ||
return flushTask; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can now be:
return Core(flushStream, flushEncoder, cancellationToken);
The separation was just to be able to have the charPos = 0 in the middle, but that's now gone.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, should be ok now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks! I'm surprised this hasn't been found until now.
Nice find! |
Fix #52811