Skip to content
This repository has been archived by the owner on Aug 20, 2020. It is now read-only.

Commit

Permalink
Define rawlen as en empty table if it is undefined
Browse files Browse the repository at this point in the history
 - 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"
  • Loading branch information
Lymkwi committed Sep 1, 2016
1 parent 5194081 commit 37f9b83
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 37f9b83

Please sign in to comment.