From 22d0fe596ae8eb2f470bd73cfd667ecdbe39a747 Mon Sep 17 00:00:00 2001 From: Kayne Ruse Date: Fri, 9 Sep 2022 18:10:45 +0100 Subject: [PATCH] Tweaked depth check, Resolved #23 --- source/interpreter.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/interpreter.c b/source/interpreter.c index 8cbeb8d..dd2d61c 100644 --- a/source/interpreter.c +++ b/source/interpreter.c @@ -997,8 +997,8 @@ static void readInterpreterSections(Interpreter* interpreter); static bool execFnCall(Interpreter* interpreter, bool looseFirstArgument) { //BUGFIX: depth check - don't drown! - if (interpreter->depth >= 1000) { - interpreter->errorOutput("Depth check failed\n"); + if (interpreter->depth >= 200) { + interpreter->errorOutput("Infinite recursion detected - panicking\n"); interpreter->panic = true; return false; }