Skip to content
Browse files

Overwrite modoption if it exists already.

  • Loading branch information...
1 parent 62ce47f commit 7b17e5e6741b7ce8e2299e550b4373f84411980f @tvo committed
Showing with 5 additions and 3 deletions.
  1. +5 −3 tools/make_modoptions.lua
View
8 tools/make_modoptions.lua
@@ -86,12 +86,14 @@ local options = chunk()
local optionKeys = {}
-for _,v in ipairs(options) do
- optionKeys[v.key] = true
+for i,v in ipairs(options) do
+ optionKeys[v.key] = i
end
for _,v in ipairs(extra_options) do
- if (not optionKeys[v.key]) then
+ if (optionKeys[v.key]) then
+ options[optionKeys[v.key]] = v
+ else
options[#options+1] = v
end
end

0 comments on commit 7b17e5e

Please sign in to comment.
Something went wrong with that request. Please try again.