Skip to content

Commit

Permalink
Fix return value of Shape:testPoint.
Browse files Browse the repository at this point in the history
  • Loading branch information
slime73 committed Nov 22, 2023
1 parent 20ffe94 commit 69dbb15
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/modules/physics/box2d/wrap_Shape.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,11 @@ int w_Shape_testPoint(lua_State *L)
float r = (float)luaL_checknumber(L, 4);
float px = (float)luaL_checknumber(L, 5);
float py = (float)luaL_checknumber(L, 6);
result = luax_catchexcept(L, [&]() { t->testPoint(x, y, r, px, py); });
luax_catchexcept(L, [&]() { result = t->testPoint(x, y, r, px, py); });
}
else
{
result = luax_catchexcept(L, [&]() { t->testPoint(x, y); });
luax_catchexcept(L, [&]() { result = t->testPoint(x, y); });
}
lua_pushboolean(L, result);
return 1;
Expand Down

0 comments on commit 69dbb15

Please sign in to comment.