aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lcode.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lcode.c b/lcode.c
index caac6ba3..87616140 100644
--- a/lcode.c
+++ b/lcode.c
@@ -776,7 +776,8 @@ void luaK_dischargevars (FuncState *fs, expdesc *e) {
776 break; 776 break;
777 } 777 }
778 case VLOCAL: { /* already in a register */ 778 case VLOCAL: { /* already in a register */
779 e->u.info = e->u.var.ridx; 779 int temp = e->u.var.ridx;
780 e->u.info = temp; /* (can't do a direct assignment; values overlap) */
780 e->k = VNONRELOC; /* becomes a non-relocatable value */ 781 e->k = VNONRELOC; /* becomes a non-relocatable value */
781 break; 782 break;
782 } 783 }
@@ -1283,8 +1284,9 @@ void luaK_indexed (FuncState *fs, expdesc *t, expdesc *k) {
1283 if (t->k == VUPVAL && !isKstr(fs, k)) /* upvalue indexed by non 'Kstr'? */ 1284 if (t->k == VUPVAL && !isKstr(fs, k)) /* upvalue indexed by non 'Kstr'? */
1284 luaK_exp2anyreg(fs, t); /* put it in a register */ 1285 luaK_exp2anyreg(fs, t); /* put it in a register */
1285 if (t->k == VUPVAL) { 1286 if (t->k == VUPVAL) {
1287 int temp = t->u.info; /* upvalue index */
1286 lua_assert(isKstr(fs, k)); 1288 lua_assert(isKstr(fs, k));
1287 t->u.ind.t = t->u.info; /* upvalue index */ 1289 t->u.ind.t = temp; /* (can't do a direct assignment; values overlap) */
1288 t->u.ind.idx = k->u.info; /* literal short string */ 1290 t->u.ind.idx = k->u.info; /* literal short string */
1289 t->k = VINDEXUP; 1291 t->k = VINDEXUP;
1290 } 1292 }