summaryrefslogtreecommitdiff
path: root/src/lib/lbaselib.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/lbaselib.c')
-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;
}