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 bug in utf16_to_utf8 for zero length strings #112154

Merged
merged 1 commit into from Jun 2, 2023

Conversation

ShaneEverittM
Copy link
Contributor

This fixes the behavior of sending EOF by pressing Ctrl+Z => Enter in a windows console.

Previously, that would trip the unpaired surrogate error, whereas now we correctly detect EOF.

This fixes the behavior of sending EOF by pressing Ctrl+Z => Enter in a
windows console.

Previously, that would trip the unpaired surrogate error, whereas now we
correctly detect EOF.
@rustbot
Copy link
Collaborator

rustbot commented Jun 1, 2023

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @thomcc (or someone else) soon.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jun 1, 2023
@ShaneEverittM
Copy link
Contributor Author

Fixes #112121.

@clubby789 clubby789 linked an issue Jun 1, 2023 that may be closed by this pull request
@thomcc
Copy link
Member

thomcc commented Jun 1, 2023

Nice catch, thanks.

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Jun 1, 2023

📌 Commit 1293c17 has been approved by thomcc

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 1, 2023
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jun 1, 2023
…omcc

Fix bug in utf16_to_utf8 for zero length strings

This fixes the behavior of sending EOF by pressing Ctrl+Z => Enter in a windows console.

Previously, that would trip the unpaired surrogate error, whereas now we correctly detect EOF.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jun 1, 2023
…omcc

Fix bug in utf16_to_utf8 for zero length strings

This fixes the behavior of sending EOF by pressing Ctrl+Z => Enter in a windows console.

Previously, that would trip the unpaired surrogate error, whereas now we correctly detect EOF.
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 1, 2023
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#111496 (Extra context for unreachable_pub lint)
 - rust-lang#111802 (Make `x test --dry-run` less verbose)
 - rust-lang#112133 (Migrate GUI colors test to original CSS color format)
 - rust-lang#112146 (Fix `src/etc/pre-push.sh` when `build.locked-deps` is already set)
 - rust-lang#112147 (add inline-const test for elided lifetimes being infer vars)
 - rust-lang#112154 (Fix bug in utf16_to_utf8 for zero length strings)
 - rust-lang#112155 (Improve CGU debug printing.)
 - rust-lang#112173 (Mention GuillaumeGomez in case GUI tests are updated)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit a66ba9b into rust-lang:master Jun 2, 2023
11 checks passed
@rustbot rustbot added this to the 1.72.0 milestone Jun 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect EOF handling in stdin::lines
4 participants