added 'return' (when possible) to calls to error functions

This commit is contained in:
Roberto Ierusalimschy
2013-02-21 10:44:53 -03:00
parent b559aed2d3
commit a83ed55f1e
3 changed files with 7 additions and 6 deletions

View File

@@ -1,5 +1,5 @@
/*
** $Id: lbaselib.c,v 1.274 2012/04/27 14:13:19 roberto Exp roberto $
** $Id: lbaselib.c,v 1.275 2012/12/03 20:18:02 roberto Exp roberto $
** Basic library
** See Copyright Notice in lua.h
*/
@@ -336,7 +336,8 @@ static int dofilecont (lua_State *L) {
static int luaB_dofile (lua_State *L) {
const char *fname = luaL_optstring(L, 1, NULL);
lua_settop(L, 1);
if (luaL_loadfile(L, fname) != LUA_OK) lua_error(L);
if (luaL_loadfile(L, fname) != LUA_OK)
return lua_error(L);
lua_callk(L, 0, LUA_MULTRET, 0, dofilecont);
return dofilecont(L);
}