Correct indices in shape list and joint list;

This commit is contained in:
bjorn 2017-05-29 10:42:07 -07:00
parent b04979da8d
commit 338a544c78
1 changed files with 2 additions and 2 deletions

View File

@ -34,7 +34,7 @@ int l_lovrColliderGetShapeList(lua_State* L) {
vec_void_t* shapes = lovrColliderGetShapes(collider);
for (int i = 0; i < shapes->length; i++) {
luax_pushshape(L, shapes->data[i]);
lua_rawseti(L, -2, i);
lua_rawseti(L, -2, i + 1);
}
return 1;
}
@ -45,7 +45,7 @@ int l_lovrColliderGetJointList(lua_State* L) {
vec_void_t* joints = lovrColliderGetJoints(collider);
for (int i = 0; i < joints->length; i++) {
luax_pushshape(L, joints->data[i]);
lua_rawseti(L, -2, i);
lua_rawseti(L, -2, i + 1);
}
return 1;
}