Put back absindex in luax_checkstruct;

I thought it was for error messages, it's for correctness.
This commit is contained in:
bjorn 2023-05-26 16:47:58 -07:00
parent 4f29e3992c
commit ce34bf702a
1 changed files with 1 additions and 0 deletions

View File

@ -147,6 +147,7 @@ static void luax_tofield(lua_State* L, int index, FieldType type, void* data) {
static void luax_checkstruct(lua_State* L, int index, const BufferField* field, char* data) {
lovrCheck(lua_istable(L, index), "Expected table for struct data");
index = index > 0 ? index : lua_gettop(L) + 1 + index;
if (!field->children[0].name || luax_len(L, index) > 0) {
for (uint32_t i = 0, j = 1; i < field->childCount; i++) {