stdlib: Fix a pointer mistake in arenas
This commit is contained in:
parent
0d5d2e5e14
commit
6f0cbf4cd4
1 changed files with 5 additions and 3 deletions
|
|
@ -37,9 +37,11 @@ impl arena for arena {
|
|||
end = n_bytes;
|
||||
}
|
||||
|
||||
let p = ptr::offset(ptr::addr_of(head.fill), start);
|
||||
head.fill = end;
|
||||
unsafe { ret unsafe::reinterpret_cast(p); }
|
||||
unsafe {
|
||||
let p = ptr::offset(vec::unsafe::to_ptr(head.data), start);
|
||||
head.fill = end;
|
||||
ret unsafe::reinterpret_cast(p);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue