lua

A copy of the Lua development repository
Log | Files | Refs | README

commit fc875334fdc2497e90969ceed1851004d9baf3c5
parent 80a267b1307107745f166c4043d8ea28c881d2f3
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date:   Fri, 20 Oct 2006 16:30:30 -0300

detail

Diffstat:
Mlbaselib.c | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lbaselib.c b/lbaselib.c @@ -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 ** See Copyright Notice in lua.h */ @@ -324,10 +324,10 @@ static int luaB_load (lua_State *L) { static int luaB_dofile (lua_State *L) { 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); lua_call(L, 0, LUA_MULTRET); - return lua_gettop(L) - n; + return lua_gettop(L) - 1; }