Lua/LuaState: Fix std::vector query for good
This commit is contained in:
parent
456a9258da
commit
bf37688b11
|
|
@ -172,11 +172,11 @@ namespace Nz
|
||||||
Nz::CallOnExit popStack { [&instance]() { instance.Pop(); } };
|
Nz::CallOnExit popStack { [&instance]() { instance.Pop(); } };
|
||||||
instance.PushInteger(pos++);
|
instance.PushInteger(pos++);
|
||||||
|
|
||||||
if (instance.GetTable(index) == Nz::LuaType_Nil)
|
int tableIndex = (index < 0) ? index - 1 : index;
|
||||||
|
if (instance.GetTable(tableIndex) == Nz::LuaType_Nil)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
T arg {};
|
T arg;
|
||||||
|
|
||||||
if (LuaImplQueryArg(instance, -1, &arg, TypeTag<T>()) != 1)
|
if (LuaImplQueryArg(instance, -1, &arg, TypeTag<T>()) != 1)
|
||||||
{
|
{
|
||||||
instance.Error("Type needs more than one place to be initialized");
|
instance.Error("Type needs more than one place to be initialized");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue