rt: Fix size miscalculation in ivec_reserve
This commit is contained in:
parent
6cf9b17086
commit
8cdef277b2
1 changed files with 1 additions and 1 deletions
|
@ -629,7 +629,7 @@ ivec_reserve(rust_task *task, type_desc *ty, rust_ivec *v, size_t n_elems)
|
||||||
} else {
|
} else {
|
||||||
// On heap; resize.
|
// On heap; resize.
|
||||||
heap_part = (rust_ivec_heap *)task->realloc(v->payload.ptr,
|
heap_part = (rust_ivec_heap *)task->realloc(v->payload.ptr,
|
||||||
new_alloc);
|
new_alloc + sizeof(size_t));
|
||||||
v->payload.ptr = heap_part;
|
v->payload.ptr = heap_part;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue