AutoExecConfig: Adjust few things

This commit is contained in:
Arkshine
2015-07-20 11:19:28 +02:00
parent 78b1154b8d
commit 5b8bbddbc1
4 changed files with 20 additions and 7 deletions

View File

@@ -449,15 +449,19 @@ void CPluginMngr::CPlugin::AddConfig(bool create, const char *name, const char *
// Do a check for duplicates to prevent double-execution
for (size_t i = 0; i < m_configs.length(); ++i)
{
auto config = m_configs[i];
AutoConfig *config = m_configs[i];
if (config->autocfg.compare(name) == 0 && config->folder.compare(folder) == 0 && config->create == create)
if (config->autocfg.compare(name) == 0 && config->folder.compare(folder) == 0)
{
if (!config->create)
{
config->create = create;
}
return;
}
}
AutoConfig *c = new AutoConfig;
auto c = new AutoConfig;
c->autocfg = name;
c->folder = folder;