From c69c9e674855bb55ca8b9d8b10a9ce8fc33a6e88 Mon Sep 17 00:00:00 2001 From: payonel Date: Wed, 14 Mar 2018 23:31:43 -0700 Subject: [PATCH] returning just the first value of debug getlocal and getupvalue the suggested access was to return nil always as the value, but these values aren't nil, and I felt it reasonable to return at least the variable name and not mislead that the value was nil closes #1607 --- src/main/resources/assets/opencomputers/lua/machine.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/resources/assets/opencomputers/lua/machine.lua b/src/main/resources/assets/opencomputers/lua/machine.lua index 06f07a70f..54945e52c 100644 --- a/src/main/resources/assets/opencomputers/lua/machine.lua +++ b/src/main/resources/assets/opencomputers/lua/machine.lua @@ -938,7 +938,9 @@ sandbox = { } end end, - traceback = debug.traceback + traceback = debug.traceback, + getlocal = function(...) return (debug.getlocal(...)) end, + getupvalue = function(...) return (debug.getupvalue(...)) end, }, -- Lua 5.3.