diff --git a/lib/external/pattern_language b/lib/external/pattern_language index 6880b7bb8..b962a3db7 160000 --- a/lib/external/pattern_language +++ b/lib/external/pattern_language @@ -1 +1 @@ -Subproject commit 6880b7bb8e871f47ef4536dd59f35175aa2da4eb +Subproject commit b962a3db79b6f18c454a758cc72dd128ce1a4e28 diff --git a/plugins/builtin/source/content/views/view_pattern_editor.cpp b/plugins/builtin/source/content/views/view_pattern_editor.cpp index 8fdac80a2..c3936b891 100644 --- a/plugins/builtin/source/content/views/view_pattern_editor.cpp +++ b/plugins/builtin/source/content/views/view_pattern_editor.cpp @@ -854,16 +854,18 @@ namespace hex::plugin::builtin { return this->m_dangerousFunctionsAllowed == DangerousFunctionPerms::Allow; }); + ON_SCOPE_EXIT { + this->m_lastEvaluationLog = runtime->getConsoleLog(); + this->m_lastEvaluationOutVars = runtime->getOutVariables(); + this->m_runningEvaluators--; + + this->m_lastEvaluationProcessed = false; + }; + this->m_lastEvaluationResult = runtime->executeString(code, envVars, inVariables); if (!this->m_lastEvaluationResult) { this->m_lastEvaluationError = runtime->getError(); } - - this->m_lastEvaluationLog = runtime->getConsoleLog(); - this->m_lastEvaluationOutVars = runtime->getOutVariables(); - this->m_runningEvaluators--; - - this->m_lastEvaluationProcessed = false; }); }