~ chicken-core (chicken-5) fa07fab41c9924ba6f176df5f11543e3009512b9


commit fa07fab41c9924ba6f176df5f11543e3009512b9
Author:     Peter Bex <peter@more-magic.net>
AuthorDate: Sat Aug 22 18:13:59 2015 +0200
Commit:     Peter Bex <peter@more-magic.net>
CommitDate: Sat Aug 22 19:37:26 2015 +0200

    C_values: another off-by-one error while moving args in av

diff --git a/runtime.c b/runtime.c
index 02f3a328..0c57b4b5 100644
--- a/runtime.c
+++ b/runtime.c
@@ -7251,7 +7251,7 @@ void C_ccall C_values(C_word c, C_word *av)
   /* Check continuation whether it receives multiple values: */
   if(C_block_item(k, 0) == (C_word)values_continuation) {
     av[ 0 ] = k;                /* reuse av */
-    C_memmove(av + 2, av + 1, (c - 1) * sizeof(C_word));
+    C_memmove(av + 1, av + 2, (c - 1) * sizeof(C_word));
     C_do_apply(c - 1, av);
   }
   
Trap