From fc4e4dc336feb15584875f651e88f1cd0936a8e6 Mon Sep 17 00:00:00 2001 From: "Alexander \"Ace\" Olofsson" Date: Fri, 30 Mar 2012 19:05:58 +0200 Subject: [PATCH] Case sensitiviy? --- components/bsa/bsa_archive.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/components/bsa/bsa_archive.cpp b/components/bsa/bsa_archive.cpp index e33f0ba49d..bd61e03395 100644 --- a/components/bsa/bsa_archive.cpp +++ b/components/bsa/bsa_archive.cpp @@ -112,7 +112,13 @@ class DirArchive: public Ogre::FileSystemArchive } pathComparer comp(delimiter, copy.size() - delimiter-1); - return std::binary_search(current.begin(), current.end(), copy, comp); + std::vector::iterator find = std::lower_bound(current.begin(), current.end(), copy, comp); + if (find != current.end() && !comp(copy, current.front())) + { + copy = *find; + return true; + } + return false; } public: