diff options
| author | Michael Sullivan <sully@msully.net> | 2011-06-27 11:27:43 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2011-06-27 12:34:45 -0700 |
| commit | 99b4fff4d28d460c25965fe3a88b1544d297cc02 (patch) | |
| tree | fa73e1d76b7d565a0fe9c0e54f619e66d2e5fd74 /src/rt/rust_upcall.cpp | |
| parent | ec809188654b4b4c8defef4f2baead6e7518cf36 (diff) | |
| download | rust-99b4fff4d28d460c25965fe3a88b1544d297cc02.tar.gz rust-99b4fff4d28d460c25965fe3a88b1544d297cc02.zip | |
Properly handle the case where src==dst but we have to allocate a new vector.
Diffstat (limited to 'src/rt/rust_upcall.cpp')
| -rw-r--r-- | src/rt/rust_upcall.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rt/rust_upcall.cpp b/src/rt/rust_upcall.cpp index 4681cbb8785..0947c44b2c9 100644 --- a/src/rt/rust_upcall.cpp +++ b/src/rt/rust_upcall.cpp @@ -480,7 +480,7 @@ upcall_vec_append(rust_task *task, type_desc *t, type_desc *elem_t, // If src and dst are the same (due to "v += v"), then dst getting // resized causes src to move as well. - if (dst == src) { + if (dst == src && !need_copy) { src = new_vec; } |
