diff options
author | bloodstalker <thabogre@gmail.com> | 2017-10-21 22:42:10 +0000 |
---|---|---|
committer | bloodstalker <thabogre@gmail.com> | 2017-10-21 22:42:10 +0000 |
commit | 17b09d82ea9926be37ebf25620d4d9b2d6fad7ba (patch) | |
tree | 34fb35b06e2ce5683c021d605d7d9f9ccf145b2b | |
parent | fixing travis build (diff) | |
download | mutator-17b09d82ea9926be37ebf25620d4d9b2d6fad7ba.tar.gz mutator-17b09d82ea9926be37ebf25620d4d9b2d6fad7ba.zip |
fixes #18
Diffstat (limited to '')
-rw-r--r-- | bruiser/bruiser.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/bruiser/bruiser.cpp b/bruiser/bruiser.cpp index 0ec8d7d..4549940 100644 --- a/bruiser/bruiser.cpp +++ b/bruiser/bruiser.cpp @@ -188,6 +188,15 @@ class LuaEngine lua_close(LS); } + void HandleLuaErrorGeneric(lua_State* LS, const char* fmt, ...) { + va_list argp; + va_start(argp, fmt); + std::vfprintf(stderr, fmt, argp); + va_end(argp); + lua_close(LS); + exit(EXIT_FAILURE); + } + private: lua_State* LS; }; @@ -1644,8 +1653,7 @@ int main(int argc, const char **argv) LE.RunChunk((char*)line.c_str()); } - LE.Cleanup(); - + dostring(LE.GetLuaState(), "os.exit()", "test"); return 0; } @@ -1672,6 +1680,8 @@ int main(int argc, const char **argv) linenoiseFree(command); } + LE.Cleanup(); + /*end of bruiser main*/ return 0; } //end of cli block |