summaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/init.lua b/init.lua
index 9e8b175..dc75fd7 100644
--- a/init.lua
+++ b/init.lua
@@ -245,7 +245,7 @@ local function check_soil(pos, nodename, strength)
end
else
-- place random grass (common)
- nod = grass[math.random(1, #grass)] or ""
+ nod = #grass > 0 and grass[math.random(1, #grass)] or ""
if nod ~= "" then
minetest.set_node(pos2, {name = nod})
end