input/Plugin: copy protocols() to stack before using it
Fixes regression by commit 015cbff93d
causing a crash bug because the
iterators of two different temporaries were used.
This commit is contained in:
parent
db93bb996c
commit
9f8dc31b50
|
@ -33,7 +33,8 @@ InputPlugin::SupportsUri(const char *uri) const noexcept
|
|||
if (StringStartsWithIgnoreCase(uri, *i))
|
||||
return true;
|
||||
} else {
|
||||
return std::any_of(protocols().begin(), protocols().end(), [uri](const auto &schema)
|
||||
const auto p = protocols();
|
||||
return std::any_of(p.begin(), p.end(), [uri](const auto &schema)
|
||||
{ return StringStartsWithIgnoreCase(uri, schema.c_str()); } );
|
||||
}
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue