From 8cdef277b24e11ab48932c38a14aaa5bd5f19bfe Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Sun, 19 Jun 2011 17:16:21 -0700 Subject: [PATCH] rt: Fix size miscalculation in ivec_reserve --- src/rt/rust_builtin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }