This commit is contained in:
Roberto Ierusalimschy
2006-10-20 16:30:53 -03:00
parent 80a267b130
commit fc875334fd

View File

@@ -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 ** Basic library
** See Copyright Notice in lua.h ** See Copyright Notice in lua.h
*/ */
@@ -324,10 +324,10 @@ static int luaB_load (lua_State *L) {
static int luaB_dofile (lua_State *L) { static int luaB_dofile (lua_State *L) {
const char *fname = luaL_optstring(L, 1, NULL); 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); if (luaL_loadfile(L, fname) != LUA_OK) lua_error(L);
lua_call(L, 0, LUA_MULTRET); lua_call(L, 0, LUA_MULTRET);
return lua_gettop(L) - n; return lua_gettop(L) - 1;
} }