diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/BLua.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/BLua.h b/include/BLua.h index 0f76284..dc2d963 100644 --- a/include/BLua.h +++ b/include/BLua.h @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: BLua.h,v 1.12 2003-12-26 20:36:07 pixel Exp $ */ +/* $Id: BLua.h,v 1.13 2004-02-27 10:35:44 pixel Exp $ */ #ifndef __BLUA_H__ #define __BLUA_H__ @@ -182,10 +182,13 @@ class LuaHelpers : public Base { Lua * L = Lua::find(_L); int add = method ? 1 : 0; int n = L->gettop() - add; - T * obj = (T *) LuaObject::getme(L); + T * obj = 0; int i; bool invalid = false; + if (method) + obj = (T *) LuaObject::getme(L); + if ((n < tab[caller].minargs) || (n > tab[caller].maxargs)) { invalid = true; } else { |