]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Skip module tags which don't have a module specified.
authorSadie Powell <sadie@witchery.services>
Tue, 10 Nov 2020 23:34:22 +0000 (23:34 +0000)
committerSadie Powell <sadie@witchery.services>
Tue, 10 Nov 2020 23:34:22 +0000 (23:34 +0000)
src/modules.cpp

index 17804a48edc93e7cc21a76761c64bb4044af43b4..77e4142b3b9b569a33e11fc927083749ef101120 100644 (file)
@@ -479,9 +479,13 @@ void ModuleManager::LoadAll()
        for (ConfigIter i = tags.first; i != tags.second; ++i)
        {
                ConfigTag* tag = i->second;
-               std::string name = ExpandModName(tag->getString("name"));
+
+               const std::string shortname = tag->getString("name");
+               if (shortname.empty())
+                       continue; // Skip malformed module tags.
 
                // Skip modules which are already loaded.
+               const std::string name = ExpandModName(shortname);
                if (Modules.find(name) != Modules.end())
                        continue;