From 956b451cdddc896fdaea596ecdf16bd8e9a82f2b Mon Sep 17 00:00:00 2001 From: Alex Shinn Date: Tue, 23 Jun 2009 11:46:56 +0900 Subject: [PATCH] Updating resume/cc needs to jump to the start of the procedure bytecode plus the offset on the stack (not directly to the offset on the stack). Need to add a call/cc test to the r5rs-tests to catch this next time. --- eval.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eval.c b/eval.c index b5faadd9..d49c8295 100644 --- a/eval.c +++ b/eval.c @@ -1262,7 +1262,7 @@ sexp sexp_vm (sexp ctx, sexp proc) { self = _ARG2; bc = sexp_procedure_code(self); cp = sexp_procedure_vars(self); - ip = (unsigned char*) sexp_unbox_integer(_ARG3); + ip = sexp_bytecode_data(bc) + sexp_unbox_integer(_ARG3); i = sexp_unbox_integer(_ARG4); top -= 4; _ARG1 = tmp1;