Use luaFatal() if luaL_dofile() explodes.
authorRyan C. Gordon <icculus@icculus.org>
Mon, 23 Dec 2013 23:48:35 -0500
changeset 16 f5a7ede6c1f3
parent 15 e2973f4fb366
child 17 e884dbb403cc
Use luaFatal() if luaL_dofile() explodes.
1pass.c
--- a/1pass.c	Mon Dec 23 23:47:51 2013 -0500
+++ b/1pass.c	Mon Dec 23 23:48:35 2013 -0500
@@ -366,12 +366,7 @@
 
     // Transfer control to Lua...
     if (luaL_dofile(luaState, "1pass.lua") != 0)
-    {
-        const char *msg = lua_tostring(luaState, -1);
-        fprintf(stderr, "1pass.lua didn't run: %s\n", msg);
-        lua_pop(luaState, 1);
-        return 0;
-    } // if
+        luaFatal(luaState);
 
     return 1;
 } // initLua