From c73587b182d27009ec789ad2a0d0dd4d9d5df7c6 Mon Sep 17 00:00:00 2001 From: Floris Date: Tue, 2 Apr 2024 15:47:11 +0200 Subject: [PATCH] gui_modoptions_panel: prevent using global var --- LuaMenu/widgets/gui_modoptions_panel.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/LuaMenu/widgets/gui_modoptions_panel.lua b/LuaMenu/widgets/gui_modoptions_panel.lua index 6e5474302..e22eacafc 100644 --- a/LuaMenu/widgets/gui_modoptions_panel.lua +++ b/LuaMenu/widgets/gui_modoptions_panel.lua @@ -533,11 +533,11 @@ local function InitializeModoptionsDisplay() return value end - local function OnSetModOptions(listener, modoptions) + local function OnSetModOptions(listener, modopts) local text = "" local empty = true - modoptions = modoptions or {} - for key, value in pairs(modoptions) do + modopts = modopts or {} + for key, value in pairs(modopts) do if modoptionDefaults[key] == nil or modoptionDefaults[key] ~= value or key == "ranked_game" then local option = getModOptionByKey(key) local name = option.name and option.name or key