diff options
Diffstat (limited to 'src/liballoc')
| -rw-r--r-- | src/liballoc/heap.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/liballoc/heap.rs b/src/liballoc/heap.rs index 3733350412e..c6c86e46b44 100644 --- a/src/liballoc/heap.rs +++ b/src/liballoc/heap.rs @@ -301,7 +301,7 @@ mod imp { libc::realloc(ptr as *mut libc::c_void, size as libc::size_t) as *mut u8 } else { let new_ptr = allocate(size, align); - ptr::copy(new_ptr, ptr, cmp::min(size, old_size)); + ptr::copy(ptr, new_ptr, cmp::min(size, old_size)); deallocate(ptr, old_size, align); new_ptr } |
