about summary refs log tree commit diff
path: root/src/rt/rust_task.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/rt/rust_task.cpp')
-rw-r--r--src/rt/rust_task.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rt/rust_task.cpp b/src/rt/rust_task.cpp
index 68882b21882..3564b9e342e 100644
--- a/src/rt/rust_task.cpp
+++ b/src/rt/rust_task.cpp
@@ -174,8 +174,8 @@ rust_task::start(uintptr_t exit_task_glue,
         src += 1;                  // spawn-call output slot
         src += 1;                  // spawn-call task slot
         src += 1;                  // spawn-call closure-or-obj slot
-        // Memcpy all but the task and output pointers
-        callsz -= (2 * sizeof(uintptr_t));
+        // Memcpy all but the task, output and env pointers
+        callsz -= (3 * sizeof(uintptr_t));
         spp = (uintptr_t*) (((uintptr_t)spp) - callsz);
         memcpy(spp, src, callsz);