Browse Source

Fix initial maxslot for down-recursive traces.

Mike Pall 11 years ago
parent
commit
dd910f0e01
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/lj_record.c

+ 1 - 1
src/lj_record.c

@@ -2131,7 +2131,7 @@ static const BCIns *rec_setup_root(jit_State *J)
   case BC_RET0:
   case BC_RET1:
     /* No bytecode range check for down-recursive root traces. */
-    J->maxslot = ra + bc_d(ins);
+    J->maxslot = ra + bc_d(ins) - 1;
     break;
   case BC_FUNCF:
     /* No bytecode range check for root traces started by a hot call. */