Skip to content

Commit

Permalink
Fix Collider/Shape/Joint:setUserData with zero args;
Browse files Browse the repository at this point in the history
  • Loading branch information
bjornbytes committed May 10, 2024
1 parent 60c5472 commit 2ffa810
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/api/l_physics_collider.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ static int l_lovrColliderGetUserData(lua_State* L) {

static int l_lovrColliderSetUserData(lua_State* L) {
luax_checktype(L, 1, Collider);
lua_settop(L, 2);
luax_pushstash(L, "lovr.collider.userdata");
lua_pushvalue(L, 1);
lua_pushvalue(L, 2);
Expand Down
1 change: 1 addition & 0 deletions src/api/l_physics_joints.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ static int l_lovrJointGetUserData(lua_State* L) {

static int l_lovrJointSetUserData(lua_State* L) {
luax_checkjoint(L, 1);
lua_settop(L, 2);
luax_pushstash(L, "lovr.joint.userdata");
lua_pushvalue(L, 1);
lua_pushvalue(L, 2);
Expand Down
1 change: 1 addition & 0 deletions src/api/l_physics_shapes.c
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ static int l_lovrShapeGetUserData(lua_State* L) {

static int l_lovrShapeSetUserData(lua_State* L) {
luax_checkshape(L, 1);
lua_settop(L, 2);
luax_pushstash(L, "lovr.shape.userdata");
lua_pushvalue(L, 1);
lua_pushvalue(L, 2);
Expand Down

0 comments on commit 2ffa810

Please sign in to comment.