1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2024-11-12 13:30:35 +01:00

Added security on nether mod to prevent crash

- Initializated pmap1[count] if nil to avoid performing arithmetic on nil
This commit is contained in:
LeMagnesium 2015-03-08 17:30:37 +01:00
parent 91e44ae813
commit 3393ce9ba1

View File

@ -384,6 +384,13 @@ minetest.register_on_generated(function(minp, maxp, seed)
count = count+1
if not pmap1[count] then
pmap1[count] = 0
end
if not pmap2[count] then
pmap2[count] = 0
end
local test = pmap1[count]+1
local test2 = pmap2[count]
local test3 = math.abs(pmap3[count])