From 631f7f46c758721945dbb201bb7f4c84f21ee863 Mon Sep 17 00:00:00 2001 From: Rui Date: Sat, 5 Nov 2016 11:17:05 +0900 Subject: [PATCH] sethome.get: Copy a return value --- mods/sethome/init.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mods/sethome/init.lua b/mods/sethome/init.lua index 4246f7a5..28bfcef6 100644 --- a/mods/sethome/init.lua +++ b/mods/sethome/init.lua @@ -41,7 +41,12 @@ sethome.set = function(name, pos) end sethome.get = function(name) - return homepos[name] + local pos = homepos[name] + if pos then + return vector.new(pos) + else + return nil + end end sethome.go = function(name) -- 2.25.1