config: find_last_of can search for multiple characters, doh

pull/43/head
jackun 4 years ago
parent 6afea3c392
commit f7e7146883
No known key found for this signature in database
GPG Key ID: 119DB3F1D05A9ED3

@ -67,8 +67,7 @@ void parseConfigFile() {
while (std::getline(stream, line, '\0'))
{
if (!line.empty()
&& ((n = line.find_last_of('\\')) != std::string::npos
|| (n = line.find_last_of('/')) != std::string::npos)
&& (n = line.find_last_of("/\\")) != std::string::npos
&& n < line.size() - 1) // have at least one character
{
auto dot = line.find_last_of('.');

Loading…
Cancel
Save