mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2024-11-14 14:30:34 +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:
parent
91e44ae813
commit
3393ce9ba1
|
@ -384,6 +384,13 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
||||||
|
|
||||||
count = count+1
|
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 test = pmap1[count]+1
|
||||||
local test2 = pmap2[count]
|
local test2 = pmap2[count]
|
||||||
local test3 = math.abs(pmap3[count])
|
local test3 = math.abs(pmap3[count])
|
||||||
|
|
Loading…
Reference in New Issue
Block a user