aboutsummaryrefslogtreecommitdiffstats
path: root/cont.c
diff options
context:
space:
mode:
Diffstat (limited to 'cont.c')
-rw-r--r--cont.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cont.c b/cont.c
index 78ae0892b0..22e0c5abe0 100644
--- a/cont.c
+++ b/cont.c
@@ -490,7 +490,7 @@ cont_capture(volatile int *stat)
contval = cont->self;
#ifdef CAPTURE_JUST_VALID_VM_STACK
- cont->vm_stack_slen = th->cfp->sp + th->mark_stack_len - th->stack;
+ cont->vm_stack_slen = th->cfp->sp - th->stack;
cont->vm_stack_clen = th->stack + th->stack_size - (VALUE*)th->cfp;
cont->vm_stack = ALLOC_N(VALUE, cont->vm_stack_slen + cont->vm_stack_clen);
MEMCPY(cont->vm_stack, th->stack, VALUE, cont->vm_stack_slen);