From 06ed44a0100f22ad5b31c1b8975e534afd0b58d1 Mon Sep 17 00:00:00 2001 From: Maxwell Jeffress Date: Sat, 30 Aug 2025 13:39:51 +1000 Subject: [PATCH] Fix calling functions inside functions --- src/main.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 44adebb..97014b7 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1883,15 +1883,15 @@ Literal exec(vector in, bool executingFunction) { // Create the variable variables[arg.ref.varName] = fnArgs[m]; } + + // Clear function arguments for next call + fnArgs.clear(); // Call the function Literal retVal = exec(functions[ref.fnName].instructions, true); // Restore scope variables = scopeBackup; - - // Clear function arguments for next call - fnArgs.clear(); // Now, assign the return value in the current scope. if (expectList) {