summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorLua Team <team@lua.org>2004-03-17 12:00:00 +0000
committerrepogen <>2004-03-17 12:00:00 +0000
commite7731a8fb8a317aa5c444ef073bfad82fa5baa54 (patch)
tree75b630332e6cdce8b40acf3282e1e8eee27b579e /src/lib
parent72286a8eeb927e1a33f24e9d99bb37ec5343ad45 (diff)
downloadlua-github-5.0.2.tar.gz
Lua 5.0.25.0.2
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/lbaselib.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/lbaselib.c b/src/lib/lbaselib.c
index 45bc7cfe..b6a4baed 100644
--- a/src/lib/lbaselib.c
+++ b/src/lib/lbaselib.c
@@ -1,5 +1,5 @@
/*
-** $Id: lbaselib.c,v 1.130a 2003/04/03 13:35:34 roberto Exp $
+** $Id: lbaselib.c,v 1.130b 2003/04/03 13:35:34 roberto Exp $
** Basic library
** See Copyright Notice in lua.h
*/
@@ -274,10 +274,11 @@ static int luaB_loadfile (lua_State *L) {
static int luaB_dofile (lua_State *L) {
const char *fname = luaL_optstring(L, 1, NULL);
+ int n = lua_gettop(L);
int status = luaL_loadfile(L, fname);
if (status != 0) lua_error(L);
lua_call(L, 0, LUA_MULTRET);
- return lua_gettop(L) - 1;
+ return lua_gettop(L) - n;
}