Fix argument to copy_nonoverlapping in internal_macros

This resolves a segfault due to unsafe code.
This commit is contained in:
Matt Corallo 2018-02-13 19:08:10 -05:00
parent 01e164025a
commit 9052f3b5a2
1 changed files with 1 additions and 1 deletions

View File

@ -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
}
}