Reading arrays of vectors works with temp vectors;

This commit is contained in:
bjorn 2023-02-05 21:44:30 -08:00
parent 92e9efd882
commit 8fa46fe236
1 changed files with 1 additions and 1 deletions

View File

@ -196,7 +196,7 @@ static void luax_readarray(lua_State* L, int index, uint32_t offset, uint32_t co
} else {
int n = fieldComponents[field->type];
if (type == LUA_TUSERDATA) {
if (type == LUA_TUSERDATA || type == LUA_TLIGHTUSERDATA) {
for (uint32_t i = 0; i < count; i++, data += field->stride) {
lua_rawgeti(L, index, i + offset + 1);
lovrCheck(lua_isuserdata(L, -1), "Expected vector object for array value (arrays must use the same type for all elements)");