Skip to content
This repository has been archived by the owner on Oct 17, 2021. It is now read-only.

Commit

Permalink
Fix parse_args not working at all
Browse files Browse the repository at this point in the history
  • Loading branch information
SpaceManiac committed Jun 9, 2020
1 parent b0bdca7 commit 6ba75cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/byond.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ thread_local! {
}

pub unsafe fn parse_args<'a>(argc: c_int, argv: *const *const c_char) -> Vec<Cow<'a, str>> {
slice::from_raw_parts(*argv, argc as usize)
slice::from_raw_parts(argv, argc as usize)
.iter()
.map(|ptr| CStr::from_ptr(ptr))
.map(|ptr| CStr::from_ptr(*ptr))
.map(|cstr| cstr.to_string_lossy())
.collect()
}
Expand Down

0 comments on commit 6ba75cd

Please sign in to comment.