From fc875334fdc2497e90969ceed1851004d9baf3c5 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 20 Oct 2006 16:30:53 -0300 Subject: detail --- lbaselib.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lbaselib.c') diff --git a/lbaselib.c b/lbaselib.c index d7413232..c68b2a52 100644 --- a/lbaselib.c +++ b/lbaselib.c @@ -1,5 +1,5 @@ /* -** $Id: lbaselib.c,v 1.192 2006/09/11 14:07:24 roberto Exp roberto $ +** $Id: lbaselib.c,v 1.193 2006/10/10 17:40:17 roberto Exp roberto $ ** Basic library ** See Copyright Notice in lua.h */ @@ -324,10 +324,10 @@ static int luaB_load (lua_State *L) { static int luaB_dofile (lua_State *L) { const char *fname = luaL_optstring(L, 1, NULL); - int n = lua_gettop(L); + lua_settop(L, 1); if (luaL_loadfile(L, fname) != LUA_OK) lua_error(L); lua_call(L, 0, LUA_MULTRET); - return lua_gettop(L) - n; + return lua_gettop(L) - 1; } -- cgit v1.2.3-55-g6feb