aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lcode.c2
-rw-r--r--lvm.c9
2 files changed, 4 insertions, 7 deletions
diff --git a/lcode.c b/lcode.c
index 3e4c5b49..2432b346 100644
--- a/lcode.c
+++ b/lcode.c
@@ -110,7 +110,7 @@ int luaK_exp2const (FuncState *fs, const expdesc *e, TValue *v) {
110** optimizations). 110** optimizations).
111*/ 111*/
112static Instruction *previousinstruction (FuncState *fs) { 112static Instruction *previousinstruction (FuncState *fs) {
113 static const Instruction invalidinstruction = -1; 113 static const Instruction invalidinstruction = ~(Instruction)0;
114 if (fs->pc > fs->lasttarget) 114 if (fs->pc > fs->lasttarget)
115 return &fs->f->code[fs->pc - 1]; /* previous instruction */ 115 return &fs->f->code[fs->pc - 1]; /* previous instruction */
116 else 116 else
diff --git a/lvm.c b/lvm.c
index e22a0da8..5407d144 100644
--- a/lvm.c
+++ b/lvm.c
@@ -1561,12 +1561,9 @@ void luaV_execute (lua_State *L, CallInfo *ci) {
1561 luaD_poscall(L, ci, cast_int(L->top - ra)); 1561 luaD_poscall(L, ci, cast_int(L->top - ra));
1562 return; 1562 return;
1563 } 1563 }
1564 else { /* Lua tail call */ 1564 ci->func -= delta;
1565 ci->func -= delta; 1565 luaD_pretailcall(L, ci, ra, b); /* prepare call frame */
1566 luaD_pretailcall(L, ci, ra, b); /* prepare call frame */ 1566 goto tailcall;
1567 goto tailcall;
1568 }
1569 vmbreak;
1570 } 1567 }
1571 vmcase(OP_RETURN) { 1568 vmcase(OP_RETURN) {
1572 int n = GETARG_B(i) - 1; /* number of results */ 1569 int n = GETARG_B(i) - 1; /* number of results */