Skip to content

Commit

Permalink
Fix argument to copy_nonoverlapping in internal_macros
Browse files Browse the repository at this point in the history
This resolves a segfault due to unsafe code.
  • Loading branch information
TheBlueMatt committed Feb 14, 2018
1 parent 01e1640 commit 9052f3b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/internal_macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ macro_rules! impl_array_newtype {
let mut ret: $thing = mem::uninitialized();
copy_nonoverlapping(data.as_ptr(),
ret.as_mut_ptr(),
mem::size_of::<$thing>());
$len);
ret
}
}
Expand Down

0 comments on commit 9052f3b

Please sign in to comment.