stdlib: Fix a pointer mistake in arenas
This commit is contained in:
parent
0d5d2e5e14
commit
6f0cbf4cd4
@ -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…
Reference in New Issue
Block a user