From 64855b41cd8f7bb152f28498d16cdb27994b66da Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Thu, 15 Jul 2010 19:21:02 +0200 Subject: [PATCH] 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 --- luaa.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/luaa.c b/luaa.c index 8133d981b..54640367d 100644 --- a/luaa.c +++ b/luaa.c @@ -862,8 +862,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));