From 8c056508029bb2383c7b32da6b16ba72bbb6449d Mon Sep 17 00:00:00 2001 From: Wires77 Date: Sun, 28 Jul 2024 14:55:21 -0500 Subject: [PATCH] Fix issue where empty configs were not loaded properly (#7996) * fix #7984: Empty configs were not considered * Revert undefined behaviour --- src/Classes/ConfigTab.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Classes/ConfigTab.lua b/src/Classes/ConfigTab.lua index ec5704d788..619de6d4c5 100644 --- a/src/Classes/ConfigTab.lua +++ b/src/Classes/ConfigTab.lua @@ -655,6 +655,11 @@ function ConfigTabClass:Load(xml, fileName) end end end + + -- Catch special case of empty Config + if xml.empty then + self:NewConfigSet(1, "Default") + end for index, node in ipairs(xml) do if node.elem ~= "ConfigSet" then if not self.configSets[1] then