diff options
Diffstat (limited to '')
| -rw-r--r-- | lcode.c | 3 |
1 files changed, 2 insertions, 1 deletions
| @@ -1315,8 +1315,8 @@ void luaK_indexed (FuncState *fs, expdesc *t, expdesc *k) { | |||
| 1315 | luaK_exp2anyreg(fs, t); /* put it in a register */ | 1315 | luaK_exp2anyreg(fs, t); /* put it in a register */ |
| 1316 | if (t->k == VUPVAL) { | 1316 | if (t->k == VUPVAL) { |
| 1317 | lu_byte temp = cast_byte(t->u.info); /* upvalue index */ | 1317 | lu_byte temp = cast_byte(t->u.info); /* upvalue index */ |
| 1318 | lua_assert(isKstr(fs, k)); | ||
| 1319 | t->u.ind.t = temp; /* (can't do a direct assignment; values overlap) */ | 1318 | t->u.ind.t = temp; /* (can't do a direct assignment; values overlap) */ |
| 1319 | lua_assert(isKstr(fs, k)); | ||
| 1320 | t->u.ind.idx = cast(short, k->u.info); /* literal short string */ | 1320 | t->u.ind.idx = cast(short, k->u.info); /* literal short string */ |
| 1321 | t->k = VINDEXUP; | 1321 | t->k = VINDEXUP; |
| 1322 | } | 1322 | } |
| @@ -1336,6 +1336,7 @@ void luaK_indexed (FuncState *fs, expdesc *t, expdesc *k) { | |||
| 1336 | t->k = VINDEXED; | 1336 | t->k = VINDEXED; |
| 1337 | } | 1337 | } |
| 1338 | } | 1338 | } |
| 1339 | t->u.ind.vidx = -1; /* by default, not a declared global */ | ||
| 1339 | } | 1340 | } |
| 1340 | 1341 | ||
| 1341 | 1342 | ||
