diff options
Diffstat (limited to 'lib/LuaHandle.cc')
-rw-r--r-- | lib/LuaHandle.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/LuaHandle.cc b/lib/LuaHandle.cc index 7ff7143..d4a204a 100644 --- a/lib/LuaHandle.cc +++ b/lib/LuaHandle.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: LuaHandle.cc,v 1.24 2008-01-21 17:55:43 pixel Exp $ */ +/* $Id: LuaHandle.cc,v 1.25 2008-01-24 10:49:59 pixel Exp $ */ #include "LuaHandle.h" @@ -633,19 +633,19 @@ int sLuaHandle::exists(lua_State * __L) { int n = L->gettop(); bool r = true; - if (n != 1) { - L->error("Incorrect number of arguments to function exists"); + if ((n != 1) || !(L->isstring(1))) { + L->error("Incorrect arguments to function exists"); } try { - Input testing(L->tostring()); + LuaInput i(new Input(L->tostring())); + i.pushdestruct(L); } catch (IOGeneral &) { + L->push(); r = false; } - L->push(r); - return 1; } |