mirror of
https://github.com/glest/glest-source.git
synced 2025-08-21 15:41:24 +02:00
bugfix for endswith needs to check >= not just >
This commit is contained in:
@@ -275,7 +275,7 @@ bool isdir(const char *path)
|
|||||||
bool EndsWith(const string &str, const string& key)
|
bool EndsWith(const string &str, const string& key)
|
||||||
{
|
{
|
||||||
bool result = false;
|
bool result = false;
|
||||||
if (str.length() > key.length()) {
|
if (str.length() >= key.length()) {
|
||||||
result = (0 == str.compare (str.length() - key.length(), key.length(), key));
|
result = (0 == str.compare (str.length() - key.length(), key.length(), key));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user