Skip to content

Commit 6e32671

Browse files
committed
ignore empty lines in config
1 parent f8b4b10 commit 6e32671

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/cleanercs2.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,9 @@ void LoadConfig()
127127
if (line[0] == '/' && line[1] == '/')
128128
continue;
129129

130+
if (line.empty())
131+
continue;
132+
130133
// allow CRLF on linux
131134
line.erase(std::remove(line.begin(), line.end(), '\r'), line.end());
132135

@@ -184,6 +187,11 @@ bool CleanerPlugin::Load(PluginId id, ISmmAPI *ismm, char *error, size_t maxlen,
184187

185188
bool CleanerPlugin::Unload(char *error, size_t maxlen)
186189
{
190+
for (auto& regex : g_RegexList)
191+
delete regex;
192+
193+
g_RegexList.clear();
194+
187195
if (g_pHook)
188196
{
189197
funchook_uninstall(g_pHook, 0);

0 commit comments

Comments
 (0)