diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2006-10-20 16:30:53 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2006-10-20 16:30:53 -0300 |
| commit | fc875334fdc2497e90969ceed1851004d9baf3c5 (patch) | |
| tree | 68a75fc62ea11f42e878ed1a36de16693c534d0e | |
| parent | 80a267b1307107745f166c4043d8ea28c881d2f3 (diff) | |
| download | lua-fc875334fdc2497e90969ceed1851004d9baf3c5.tar.gz lua-fc875334fdc2497e90969ceed1851004d9baf3c5.tar.bz2 lua-fc875334fdc2497e90969ceed1851004d9baf3c5.zip | |
detail
| -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 | ||
