mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-11 07:11:39 +00:00
Lunatic: make -Lopts=strict also error on some table reads w/ nonexistent keys.
Specifically, for the tables returned with require"DEFS" etc. This allows to check if maybe parts of a bundle of files is missing (because comparisons like "spr.picnum == D.NONEXISTENT_NAME" do not yield errors normally). git-svn-id: https://svn.eduke32.com/eduke32@4050 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
1328c66f9c
commit
85aa90d82c
1 changed files with 3 additions and 1 deletions
|
@ -2482,7 +2482,9 @@ if (concode) then
|
|||
local function protect_con_table(tab)
|
||||
-- NOTE: Some of our code specifically excepts the name tables to be
|
||||
-- indexable with nonexistent keys. See e.g. control.c: _A_SpawnGlass()
|
||||
-- tab = setmetatable(tab, index_error_mt)
|
||||
if (ffiC._LUNATIC_STRICT ~= 0) then
|
||||
tab = setmetatable(tab, index_error_mt)
|
||||
end
|
||||
return setmtonce({}, { __index=tab, __newindex=basemod_newidx })
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue