diff options
author | Paul Ouellette <oue.paul18@gmail.com> | 2020-06-09 13:37:25 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-09 19:37:25 +0200 |
commit | b16f841756ef86e83710ad2fddf2cd5bafdf4bcc (patch) | |
tree | 777e5dee13e1e2d20a7f8e4a5b8df19a7fad6b85 /builtin/common/misc_helpers.lua | |
parent | 09e285f38cd96b4278b921ab82c5266082bb1a0d (diff) | |
download | minetest-b16f841756ef86e83710ad2fddf2cd5bafdf4bcc.tar.gz minetest-b16f841756ef86e83710ad2fddf2cd5bafdf4bcc.tar.bz2 minetest-b16f841756ef86e83710ad2fddf2cd5bafdf4bcc.zip |
LuaItemStack: Add __tostring metamethod (#8785)
* LuaItemStack: Add __tostring metamethod
* Clean up LuaItemStack::checkobject
Diffstat (limited to 'builtin/common/misc_helpers.lua')
-rw-r--r-- | builtin/common/misc_helpers.lua | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/builtin/common/misc_helpers.lua b/builtin/common/misc_helpers.lua index a88adf96d..e29a9f422 100644 --- a/builtin/common/misc_helpers.lua +++ b/builtin/common/misc_helpers.lua @@ -20,6 +20,8 @@ local function basic_dump(o) -- dump's output is intended for humans. --elseif tp == "function" then -- return string.format("loadstring(%q)", string.dump(o)) + elseif tp == "userdata" then + return tostring(o) else return string.format("<%s>", tp) end |