Define rawlen as en empty table if it is undefined

- Minetest won't let us define something global unless it's a table.
   Shall it be so.
 - This prevents Minetest from complaining about StackTracePlus' attempt
   to define "rawlen"
This commit is contained in:
LeMagnesium 2016-09-01 12:10:14 +02:00
parent 5194081791
commit 37f9b83b77
No known key found for this signature in database
GPG Key ID: A54DDB5272C51E8B

View File

@ -2,6 +2,12 @@ local secenv = _G
local modname = minetest.get_current_modname()
local sec = (minetest.setting_get('secure.enable_security') == 'true')
local ie
-- //MFF (Mg|01/07/2016 for classic#508, hg#104, sb#166, creative#68)
if (rawget(_G, "rawlen") == nil) then
rawlen = {} -- That's extremely bad, but our only mean of stopping StackTracePlus from complaining about rawlen being undefined
end
if sec then
ie = minetest.request_insecure_environment()
if ie == nil then