summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorsanine <sanine.not@pm.me>2022-04-16 11:37:44 -0500
committersanine <sanine.not@pm.me>2022-04-16 11:37:44 -0500
commit55860037b14fb3893ba21cf2654c83d349cc1082 (patch)
tree0271d4e524c45dcb9b6c49f1c81092b71dc8a7e3 /src/main.c
parent058f98a63658dc1a2579826ba167fd61bed1e21f (diff)
fix bug in main script loader and rename honey_gl.c -> honey_window.c
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main.c b/src/main.c
index a55dc6f..a92541d 100644
--- a/src/main.c
+++ b/src/main.c
@@ -41,15 +41,16 @@ int main(int argc, char **argv)
/* load main script */
honey_debug("loading '%s'\n", options.main_script);
- if (luaL_loadfile(L, options.main_script)) {
+ if (luaL_loadfile(L, options.main_script) != 0) {
const char *error = lua_tostring(L, -1);
honey_fatal("%s\n", error);
return 1;
}
- if (!hs_call(L, 0, 0)) {
+ if (hs_call(L, 0, 0) != 0) {
+ honey_debug("stack size: %d\n", lua_gettop(L));
const char *error = lua_tostring(L, -1);
- honey_fatal("unhandled error: %s", error);
+ honey_fatal("error loading main file: %s\n", error);
goto close; /* sorry */
}