Handle errors in the config better

luaA_loadrc() now returns a failure when executing the config file causes an
error.
Previously it returned a success which meant the next config file wasn't tried.

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2010-07-15 19:21:02 +02:00
parent e9c2907488
commit 11084c774c
1 changed files with 3 additions and 1 deletions

4
luaa.c
View File

@ -833,8 +833,10 @@ luaA_loadrc(const char *confpath, bool run)
}
}
else
{
lua_pop(globalconf.L, 1);
return true;
return true;
}
}
else
fprintf(stderr, "%s\n", lua_tostring(globalconf.L, -1));