From 042d4a1e1c4d8b154c780e6ee1294d572a710242 Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Fri, 21 Aug 2026 12:53:49 -0300 Subject: [PATCH] Fix love.physics.newPolygonBody arg checking --- src/modules/physics/box2d/wrap_Physics.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/physics/box2d/wrap_Physics.cpp b/src/modules/physics/box2d/wrap_Physics.cpp index bf73fb607..134821cd7 100644 --- a/src/modules/physics/box2d/wrap_Physics.cpp +++ b/src/modules/physics/box2d/wrap_Physics.cpp @@ -141,7 +141,7 @@ int w_newPolygonBody(lua_State *L) if (!Body::getConstant(typestr, btype)) return luax_enumerror(L, "Body type", Body::getConstants(btype), typestr); - int argc = lua_gettop(L); + int argc = lua_gettop(L) - 2; bool istable = lua_istable(L, 3); if (istable)