From 298689074649db0d79993c6326ddf106b5a23d2b Mon Sep 17 00:00:00 2001 From: Bart van Strien Date: Fri, 18 May 2012 18:00:04 +0200 Subject: [PATCH] Fix Shape:testPoint's stack indices (issue #430) --- src/modules/physics/box2d/wrap_Shape.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/modules/physics/box2d/wrap_Shape.cpp b/src/modules/physics/box2d/wrap_Shape.cpp index dad8f08e4..ff5d128e3 100644 --- a/src/modules/physics/box2d/wrap_Shape.cpp +++ b/src/modules/physics/box2d/wrap_Shape.cpp @@ -60,11 +60,11 @@ namespace box2d int w_Shape_testPoint(lua_State * L) { Shape * t = luax_checkshape(L, 1); - float x = (float)luaL_checknumber(L, 1); - float y = (float)luaL_checknumber(L, 2); - float r = (float)luaL_checknumber(L, 3); - float px = (float)luaL_checknumber(L, 4); - float py = (float)luaL_checknumber(L, 5); + float x = (float)luaL_checknumber(L, 2); + float y = (float)luaL_checknumber(L, 3); + float r = (float)luaL_checknumber(L, 4); + float px = (float)luaL_checknumber(L, 5); + float py = (float)luaL_checknumber(L, 6); bool result = t->testPoint(x, y, r, px, py); lua_pushboolean(L, result); return 1;