Update externs.rs

I'm not entirely sure about it, but the rest of the file treats 32 bits as groups of 4 so it makes sense that memcpy does the same.
This commit is contained in:
L3nn0x
2017-09-20 09:49:40 +01:00
committed by GitHub
parent d6b9768dc3
commit eebba9291a

View File

@@ -32,7 +32,7 @@ pub unsafe extern fn memcpy(dest: *mut u8, src: *const u8,
#[no_mangle]
pub unsafe extern fn memcpy(dest: *mut u8, src: *const u8,
n: usize) -> *mut u8 {
let n_32: usize = n/8; // Number of 32-bit groups
let n_32: usize = n/4; // Number of 32-bit groups
let mut i: usize = 0;
// Copy 4 bytes at a time