From fe434787e55942d2973340ab7a0f24d1a39b9415 Mon Sep 17 00:00:00 2001 From: Maxwell Jeffress Date: Tue, 20 May 2025 19:01:55 +1000 Subject: [PATCH] Fix the friendly segfault (it didnt do anything lol) --- src/Interpreter.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Interpreter.cpp b/src/Interpreter.cpp index e12ae91..806303e 100644 --- a/src/Interpreter.cpp +++ b/src/Interpreter.cpp @@ -341,9 +341,14 @@ optional Interpreter::interpret(vector tokenList, bool isFunction) } // Execute the instruction log.debug("Length of line is " + to_string(lengthOfLine)); + if (isFunction) { + optional returnTokenOptional = executeCode(currentInstruction, true); + if (returnTokenOptional.has_value()); + } executeCode(currentInstruction, isFunction); lengthOfLine = 0; } + return {}; } optional Interpreter::executeCode(vector tokens, bool isFunction) {