From 7fcd5a473fb8278224f98c957f88847cd702774c Mon Sep 17 00:00:00 2001 From: Auke Kok Date: Sun, 5 Feb 2023 17:44:20 -0800 Subject: [PATCH] Fix crash in xattr retrieve. --- mods/player/init.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mods/player/init.lua b/mods/player/init.lua index b8671b9..7d3069c 100644 --- a/mods/player/init.lua +++ b/mods/player/init.lua @@ -499,6 +499,9 @@ minetest.register_chatcommand("attr", { return false, S("No such player.") end local pmeta = p:get_meta() + if not params[3] then + return true, {} .. "=" .. dump(pmeta:to_table()) + end return true, params[3] .. "=" .. dump(pmeta:get_string(params[3])) else return false, S("Usage: /attr ") -- 2.11.4.GIT