mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 23:58:20 +00:00
Don't call tokenize_string if the input string is empty
This commit is contained in:
parent
2e457eb3ea
commit
359b5547cd
1 changed files with 7 additions and 3 deletions
|
@ -359,10 +359,14 @@ void Manager::ActivateDynamicPlugins(bool all)
|
||||||
|
|
||||||
// Activate plugins that our environment tells us to.
|
// Activate plugins that our environment tells us to.
|
||||||
vector<string> p;
|
vector<string> p;
|
||||||
|
std::string plugin_activate = util::zeek_plugin_activate();
|
||||||
|
if ( ! plugin_activate.empty() )
|
||||||
|
{
|
||||||
util::tokenize_string(util::zeek_plugin_activate(), ",", &p);
|
util::tokenize_string(util::zeek_plugin_activate(), ",", &p);
|
||||||
|
|
||||||
for ( const auto& x : p )
|
for ( const auto& x : p )
|
||||||
plugins_to_activate.emplace(x, true);
|
plugins_to_activate.emplace(x, true);
|
||||||
|
}
|
||||||
|
|
||||||
if ( all )
|
if ( all )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue