Skip to content
Snippets Groups Projects
Commit e1b20ed3 authored by Tom Almeida's avatar Tom Almeida
Browse files

Fixed getopt passing the wrong argument to stdio functions

parent ae097074
No related branches found
No related tags found
No related merge requests found
...@@ -69,10 +69,10 @@ unsafe fn parse_arg( ...@@ -69,10 +69,10 @@ unsafe fn parse_arg(
let print_error = |desc: &[u8]| { let print_error = |desc: &[u8]| {
// NOTE: we don't use fprintf to get around the usage of va_list // NOTE: we don't use fprintf to get around the usage of va_list
stdio::fputs(*argv as _, stdio::stderr); stdio::fputs(*argv as _, &mut *stdio::stderr);
stdio::fputs(desc.as_ptr() as _, stdio::stderr); stdio::fputs(desc.as_ptr() as _, &mut *stdio::stderr);
stdio::fputc(*current_arg as _, stdio::stderr); stdio::fputc(*current_arg as _, &mut *stdio::stderr);
stdio::fputc(b'\n' as _, stdio::stderr); stdio::fputc(b'\n' as _, &mut *stdio::stderr);
}; };
match find_option(*current_arg, optstring) { match find_option(*current_arg, optstring) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment