Tweaked depth check, Resolved #23

This commit is contained in:
2022-09-09 18:10:45 +01:00
parent 4b99ce2fb6
commit 22d0fe596a

View File

@@ -997,8 +997,8 @@ static void readInterpreterSections(Interpreter* interpreter);
static bool execFnCall(Interpreter* interpreter, bool looseFirstArgument) { static bool execFnCall(Interpreter* interpreter, bool looseFirstArgument) {
//BUGFIX: depth check - don't drown! //BUGFIX: depth check - don't drown!
if (interpreter->depth >= 1000) { if (interpreter->depth >= 200) {
interpreter->errorOutput("Depth check failed\n"); interpreter->errorOutput("Infinite recursion detected - panicking\n");
interpreter->panic = true; interpreter->panic = true;
return false; return false;
} }