Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
dofile error reporting for syntax errors
According to doc, dofile() raises an error when parsing failed due to syntax errors.
Fixes #2775
  • Loading branch information
est31 committed Jun 12, 2015
1 parent 0b187ed commit 502e40a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/script/cpp_api/s_security.cpp
Expand Up @@ -407,7 +407,8 @@ int ScriptApiSecurity::sl_g_dofile(lua_State *L)
{
int nret = sl_g_loadfile(L);
if (nret != 1) {
return nret;
lua_error(L);
// code after this function isn't executed
}
int top_precall = lua_gettop(L);
lua_call(L, 0, LUA_MULTRET);
Expand Down

0 comments on commit 502e40a

Please sign in to comment.