summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>2014-08-23 17:59:32 -0400
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>2014-08-23 17:59:32 -0400
commit42a364b81896bda1f469176e67de8085f062028f (patch)
tree709c2675b1fb4570bc7c6537cbec5ca4b53c8198
parent2838f0125f8278f72088e683dbfbe3fb43af16de (diff)
downloadpipeworks-42a364b81896bda1f469176e67de8085f062028f.tar
pipeworks-42a364b81896bda1f469176e67de8085f062028f.tar.gz
pipeworks-42a364b81896bda1f469176e67de8085f062028f.tar.bz2
pipeworks-42a364b81896bda1f469176e67de8085f062028f.tar.xz
pipeworks-42a364b81896bda1f469176e67de8085f062028f.zip
quick hack to prevent crash in load_position() call if given a set of
coords that are out of valid range
-rwxr-xr-xcommon.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/common.lua b/common.lua
index 5ccf7d5..b50b733 100755
--- a/common.lua
+++ b/common.lua
@@ -136,6 +136,8 @@ end
---------
function minetest.load_position(pos)
+ if pos.x < -30912 or pos.y < -30912 or pos.z < -30912 or
+ pos.x > 30927 or pos.y > 30927 or pos.z > 30927 then return end
if minetest.get_node_or_nil(pos) then
return
end