aboutsummaryrefslogtreecommitdiffstats
path: root/bruiser/bruiser.cpp
diff options
context:
space:
mode:
authorbloodstalker <thabogre@gmail.com>2018-06-24 06:16:22 +0000
committerbloodstalker <thabogre@gmail.com>2018-06-24 06:16:22 +0000
commit045e4e775c5d0ee2e7fd489cc3c236861fa5f004 (patch)
tree17a24b4f1d29e48f7c5b6db28927700d4e3bf186 /bruiser/bruiser.cpp
parentfixes #43. the auto-gen source files by luatablegen dont look like source fil... (diff)
downloadmutator-045e4e775c5d0ee2e7fd489cc3c236861fa5f004.tar.gz
mutator-045e4e775c5d0ee2e7fd489cc3c236861fa5f004.zip
fixes 42, fixes 44
Diffstat (limited to 'bruiser/bruiser.cpp')
-rw-r--r--bruiser/bruiser.cpp22
1 files changed, 12 insertions, 10 deletions
diff --git a/bruiser/bruiser.cpp b/bruiser/bruiser.cpp
index 7e6a22e..99f7731 100644
--- a/bruiser/bruiser.cpp
+++ b/bruiser/bruiser.cpp
@@ -1375,22 +1375,24 @@ class LuaWrapper
int BruiserPyLoader(lua_State* __ls ) {
int numargs = lua_gettop(__ls);
//std::string filename = "../bfd/load.py";
- std::string filename = "load";
+ //std::string filename = "load";
+ std::string filename;
std::string funcname;
std::string objjpath;
std::string action;
- if (numargs == 3) {
+ if (numargs == 4) {
if (Verbose) std::cout << CYAN << "got args." << NORMAL << "\n";
- funcname = lua_tostring(__ls, 1);
- if (funcname == "") PRINT_WITH_COLOR_LB(RED, "first argument is nil");
- objjpath = lua_tostring(__ls, 2);
- if (objjpath == "") PRINT_WITH_COLOR_LB(RED, "second argument is nil");
- action = lua_tostring(__ls, 3);
- if (action == "") PRINT_WITH_COLOR_LB(RED, "third argument is nil");
+ filename = lua_tostring(__ls, 1);
+ if (filename == "") PRINT_WITH_COLOR_LB(RED, "first argument is nil");
+ funcname = lua_tostring(__ls, 2);
+ if (funcname == "") PRINT_WITH_COLOR_LB(RED, "second argument is nil");
+ objjpath = lua_tostring(__ls, 3);
+ if (objjpath == "") PRINT_WITH_COLOR_LB(RED, "third argument is nil");
+ action = lua_tostring(__ls, 4);
+ if (action == "") PRINT_WITH_COLOR_LB(RED, "fourth argument is nil");
std::cout << NORMAL;
- }
- else {
+ } else {
std::cout << RED << "wrong number of arguments provided. should give the python script name, python func name and the return type.\n" << NORMAL;
return EXIT_FAILURE;
}