summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/utils/string.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/utils/string.cpp b/src/utils/string.cpp
index 089a5373..b74b91ee 100644
--- a/src/utils/string.cpp
+++ b/src/utils/string.cpp
@@ -76,7 +76,13 @@ int compareStrI(const std::string &a, const std::string &b)
return comp;
}
- return 0;
+ // See which one is longer, if either
+ if (itA == endA && itB != endB)
+ return -1;
+ else if (itA != endA && itB == endB)
+ return 1;
+ else
+ return 0;
}
bool stringToBool(const std::string &s, bool defaultValue)