diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2011-06-19 17:16:21 -0700 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2011-06-19 18:03:19 -0700 |
| commit | 8cdef277b24e11ab48932c38a14aaa5bd5f19bfe (patch) | |
| tree | 84ca1e896547d09420496f59154c4b7088fd1507 /src/rt/rust_builtin.cpp | |
| parent | 6cf9b17086c6cf9ed8a3e7487b9629d5cf8eaf8e (diff) | |
| download | rust-8cdef277b24e11ab48932c38a14aaa5bd5f19bfe.tar.gz rust-8cdef277b24e11ab48932c38a14aaa5bd5f19bfe.zip | |
rt: Fix size miscalculation in ivec_reserve
Diffstat (limited to 'src/rt/rust_builtin.cpp')
| -rw-r--r-- | src/rt/rust_builtin.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rt/rust_builtin.cpp b/src/rt/rust_builtin.cpp index ca8f24a4227..74b1075f701 100644 --- a/src/rt/rust_builtin.cpp +++ b/src/rt/rust_builtin.cpp @@ -629,7 +629,7 @@ ivec_reserve(rust_task *task, type_desc *ty, rust_ivec *v, size_t n_elems) } else { // On heap; resize. heap_part = (rust_ivec_heap *)task->realloc(v->payload.ptr, - new_alloc); + new_alloc + sizeof(size_t)); v->payload.ptr = heap_part; } |
