Skip to content

std: Don't parse argv as a String #20100

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

Closed
wants to merge 1 commit into from

Conversation

alexcrichton
Copy link
Member

Instead, just pass everything through as a Vec to get worried about later.

Closes #20091

@rust-highfive
Copy link
Contributor

r? @nikomatsakis

(rust_highfive has picked a reviewer for you, use r? to override)

Instead, just pass everything through as a Vec<u8> to get worried about later.

Closes rust-lang#20091
let mut len = 0u;
while *arg.offset(len as int) != 0 {
len += 1u;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't this use CString, instead of duplicating that logic?

alexcrichton added a commit to alexcrichton/rust that referenced this pull request Dec 21, 2014
Instead, just pass everything through as a Vec<u8> to get worried about later.

Closes rust-lang#20091
@alexcrichton
Copy link
Member Author

Rolled into #20104 (must've picked up the wrong commit...)

@alexcrichton alexcrichton deleted the issue-20091 branch December 22, 2014 02:59
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.

program chokes on non-utf8 command line arguments even if it doesn't access them
5 participants