From e74f65eb70077d05d4a212b63d71fd54e42415dd Mon Sep 17 00:00:00 2001 From: Mihail Date: Wed, 31 Jul 2024 13:37:46 +0400 Subject: [PATCH] pcall(function, varargs) --- res/layouts/console.xml.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/res/layouts/console.xml.lua b/res/layouts/console.xml.lua index e23ce357..819ac1fd 100644 --- a/res/layouts/console.xml.lua +++ b/res/layouts/console.xml.lua @@ -45,8 +45,8 @@ function submit(text) setup_variables() document.log.caret = -1 - local status, result = pcall(function() return console.execute(text) end) - if result ~= nil then + local status, result = pcall(console.execute, text) + if result then console.log(result) end document.prompt.text = ""