diff options
-rw-r--r-- | lbaselib.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lbaselib.c,v 1.192 2006/09/11 14:07:24 roberto Exp roberto $ | 2 | ** $Id: lbaselib.c,v 1.193 2006/10/10 17:40:17 roberto Exp roberto $ |
3 | ** Basic library | 3 | ** Basic library |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -324,10 +324,10 @@ static int luaB_load (lua_State *L) { | |||
324 | 324 | ||
325 | static int luaB_dofile (lua_State *L) { | 325 | static int luaB_dofile (lua_State *L) { |
326 | const char *fname = luaL_optstring(L, 1, NULL); | 326 | const char *fname = luaL_optstring(L, 1, NULL); |
327 | int n = lua_gettop(L); | 327 | lua_settop(L, 1); |
328 | if (luaL_loadfile(L, fname) != LUA_OK) lua_error(L); | 328 | if (luaL_loadfile(L, fname) != LUA_OK) lua_error(L); |
329 | lua_call(L, 0, LUA_MULTRET); | 329 | lua_call(L, 0, LUA_MULTRET); |
330 | return lua_gettop(L) - n; | 330 | return lua_gettop(L) - 1; |
331 | } | 331 | } |
332 | 332 | ||
333 | 333 | ||