From f6e9f4cac7ca95b980449a0c612fd3e05c6f8c3a Mon Sep 17 00:00:00 2001 From: Bart van Strien Date: Sun, 15 Jan 2012 11:09:38 +0100 Subject: [PATCH] Stop Body:getWorldPoints from overflowing the lua stack --- src/modules/physics/box2d/Body.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/modules/physics/box2d/Body.cpp b/src/modules/physics/box2d/Body.cpp index 5397e5ce7..e4d37f40a 100644 --- a/src/modules/physics/box2d/Body.cpp +++ b/src/modules/physics/box2d/Body.cpp @@ -316,9 +316,14 @@ namespace box2d for (int i = 0;iGetWorldPoint(Physics::scaleDown(b2Vec2(x, y)))); + // And then we push the result lua_pushnumber(L, point.x); lua_pushnumber(L, point.y); }