fix an issue that the first element of tuple array is stored at zero index of table on LuaJIT
This commit is contained in:
parent
3c2ed1731a
commit
eeb7dabd1f
@ -61,7 +61,7 @@ void PushValue(lua_State* L, const nf7::Value& v) noexcept {
|
||||
for (auto& p : tup) {
|
||||
PushValue(L, p.second);
|
||||
if (p.first.empty()) {
|
||||
lua_rawseti(L, -2, static_cast<int>(arridx++));
|
||||
lua_rawseti(L, -2, static_cast<int>(++arridx));
|
||||
} else {
|
||||
lua_setfield(L, -2, p.first.c_str());
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user