diff options
author | sanine <sanine.not@pm.me> | 2022-04-16 11:37:44 -0500 |
---|---|---|
committer | sanine <sanine.not@pm.me> | 2022-04-16 11:37:44 -0500 |
commit | 55860037b14fb3893ba21cf2654c83d349cc1082 (patch) | |
tree | 0271d4e524c45dcb9b6c49f1c81092b71dc8a7e3 /src/main.c | |
parent | 058f98a63658dc1a2579826ba167fd61bed1e21f (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.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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 */ } |