Skip to content
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 stream bugs #196

Merged
merged 2 commits into from
Sep 10, 2024
Merged

Fix stream bugs #196

merged 2 commits into from
Sep 10, 2024

Conversation

mlugg
Copy link
Contributor

@mlugg mlugg commented Sep 9, 2024

This should resolve the remaining bugs underlying #178.

The old interface definition was incorrect; this led to `Stream.read`
being called with a number as its `mode` parameter, which was
interpreted as the read having no maximum length.
* The initial loop failed to increment `resultSize`, making it a nop.
  `resultSize` would always be the initial chunk's size.
* The main loop shifted chunks before checking for their inclusion in
  the output, causing the first excluded chunk to be silently dropped.
* Chunks were shifted in a loop which iterated based on index/length,
  meaning we always ignored half of the available chunks.
@mlugg
Copy link
Contributor Author

mlugg commented Sep 9, 2024

@microsoft-github-policy-service agree

@kristoff-it
Copy link

Can confirm this PR fixes all the problems still present from #178

@vs-code-engineering vs-code-engineering bot added this to the September 2024 milestone Sep 10, 2024
@dbaeumer dbaeumer merged commit 3dfebbd into microsoft:main Sep 10, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants