summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/generator.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/python/generator.cpp b/python/generator.cpp
index 39e45aea..2b2f0e91 100644
--- a/python/generator.cpp
+++ b/python/generator.cpp
@@ -396,9 +396,18 @@ int main(int argc, char* argv[])
// As of writing this, only BNLog's have variable instruction lengths, but in an attempt not to break in the future:
if (funcName.compare(0, 6, "_BNLog") == 0)
{
- fprintf(out, "def %s(*args):\n", name.c_str());
- fprintf(out, "\treturn %s(*[cstr(arg) for arg in args])\n\n", funcName.c_str());
- continue;
+ if (funcName != "_BNLog")
+ {
+ fprintf(out, "def %s(*args):\n", name.c_str());
+ fprintf(out, "\treturn %s(*[cstr(arg) for arg in args])\n\n", funcName.c_str());
+ continue;
+ }
+ else
+ {
+ fprintf(out, "def %s(level, *args):\n", name.c_str());
+ fprintf(out, "\treturn %s(level, *[cstr(arg) for arg in args])\n\n", funcName.c_str());
+ continue;
+ }
}
}