bugfix for endswith needs to check >= not just >
This commit is contained in:
parent
70383f2a30
commit
ab5369a090
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user