mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-24 22:58:50 +01:00
smartlist.rs: The libc::c_char type is not the same as i8.
The code had been using c_char and i8 interchangeably, but it turns out that c_char is only i8 on platforms where "char" is signed. On other platforms, c_char is u8. Fixes bug 24794; bug not on any released Tor.
This commit is contained in:
parent
e0ccec219b
commit
1dab8bae21
1 changed files with 1 additions and 1 deletions
|
@ -33,7 +33,7 @@ impl Smartlist<String> for Stringlist {
|
|||
|
||||
// unsafe, as we need to extract the smartlist list into a vector of
|
||||
// pointers, and then transform each element into a Rust string.
|
||||
let elems: &[*const i8] =
|
||||
let elems: &[*const c_char] =
|
||||
unsafe { slice::from_raw_parts(self.list, self.num_used as usize) };
|
||||
|
||||
for elem in elems.iter() {
|
||||
|
|
Loading…
Add table
Reference in a new issue