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

pppd: Fix sign-extension when displaying bytes in octal #30

Merged
merged 1 commit into from
Apr 17, 2016

Conversation

pprindeville
Copy link
Contributor

print_string() displays characters as %.03o but without first
casting it from "char" to "unsigned char" so it gets sign-extended
to an int. This causes output like \37777777630 instead of \230.

Signed-off-by: Philip A. Prindeville philipp@redfish-solutions.com

print_string() displays characters as \\%.03o but without first
casting it from "char" to "unsigned char" so it gets sign-extended
to an int. This causes output like \37777777630 instead of \230.

Signed-off-by: Philip A. Prindeville <philipp@redfish-solutions.com>
@pprindeville
Copy link
Contributor Author

Related issue: #43

@paulusmack paulusmack merged commit 5e8c3cb into ppp-project:master Apr 17, 2016
@pprindeville
Copy link
Contributor Author

Thanks, @paulusmack. Hard to believe we've been banging on PPP since what... 1992?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants