Skip to content

Commit

Permalink
sethome.get: Copy a return value
Browse files Browse the repository at this point in the history
  • Loading branch information
Rui authored and sofar committed Nov 6, 2016
1 parent 178db04 commit 631f7f4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion mods/sethome/init.lua
Expand Up @@ -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)
Expand Down

0 comments on commit 631f7f4

Please sign in to comment.