Eliminate LuaStack::rawgeti, it's not safe

This commit is contained in:
2021-11-17 15:11:55 -05:00
parent fb043e9971
commit 0881e33c6f
5 changed files with 32 additions and 32 deletions

View File

@@ -175,9 +175,9 @@ static void pprint_r(Inspector &insp, int level, LuaSlot root) {
// Output the table keys.
table_getpairs(LS, root, pairs, true);
for (int i = 2; ; i+=2) {
LS.rawgeti(key, pairs, i);
LS.rawget(key, pairs, i);
if (LS.isnil(key)) break;
LS.rawgeti(val, pairs, i+1);
LS.rawget(val, pairs, i+1);
if (needcomma) (*insp.stream) << ",";
needcomma = true;
if (LS.isnumber(key) && (LS.ckint(key) == nextseq)) {