diff --git a/src/client/Client.cpp b/src/client/Client.cpp index 4c7ac4370..75e01ebf8 100644 --- a/src/client/Client.cpp +++ b/src/client/Client.cpp @@ -467,7 +467,7 @@ std::vector Client::DirectorySearch(std::string directory, std::str bool extensionMatch = !extensions.size(); for(std::vector::iterator extIter = extensions.begin(), extEnd = extensions.end(); extIter != extEnd; ++extIter) { - if(filename.find(*extIter)==filename.length()-(*extIter).length()) + if(filename.find(*extIter, filename.length()-(*extIter).length())==filename.length()-(*extIter).length()) { extensionMatch = true; break;