Skip to content

Commit 415d3c5

Browse files
committed
Don't accept wrong flags
1 parent ecd3824 commit 415d3c5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

mods/default/init.lua

+4-2
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,13 @@ local function parse_flagstr(dest, s)
106106
local flags = string.split(s, ",", false)
107107
for _, flag in ipairs(flags) do
108108
flag = flag:gsub("^%s*", ""):gsub("%s*$", "")
109-
-- "node" also begins with "no" hence the extra check
110109
if flag:sub(1, 2) == "no" and rawget(dest, flag:sub(3)) ~= nil then
111110
dest[flag:sub(3)] = false
112-
else
111+
elseif rawget(dest, flag) ~= nil then
113112
dest[flag] = true
113+
else
114+
minetest.log("warning",
115+
("Ignoring unknown modernize flag: %q"):format(flag))
114116
end
115117
end
116118
end

0 commit comments

Comments
 (0)