summaryrefslogtreecommitdiff
path: root/src/bytecode.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bytecode.c')
-rw-r--r--src/bytecode.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/bytecode.c b/src/bytecode.c
index 9bf6ae45ce..1ad01aaf8f 100644
--- a/src/bytecode.c
+++ b/src/bytecode.c
@@ -500,7 +500,9 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
optional = 1;
else if (EQ (XCAR (at), Qand_rest))
{
- PUSH (Flist (nargs, args));
+ PUSH (pushed < nargs
+ ? Flist (nargs - pushed, args)
+ : Qnil);
pushed = nargs;
at = Qnil;
break;