bugfix for endswith needs to check >= not just >

This commit is contained in:
Mark Vejvoda 2010-05-17 20:05:35 +00:00
parent 70383f2a30
commit ab5369a090

View File

@ -275,7 +275,7 @@ bool isdir(const char *path)
bool EndsWith(const string &str, const string& key)
{
bool result = false;
if (str.length() > key.length()) {
if (str.length() >= key.length()) {
result = (0 == str.compare (str.length() - key.length(), key.length(), key));
}