aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/core/basetypes/MCString.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/basetypes/MCString.cpp b/src/core/basetypes/MCString.cpp
index 213d5e5f..02c93200 100644
--- a/src/core/basetypes/MCString.cpp
+++ b/src/core/basetypes/MCString.cpp
@@ -1194,6 +1194,9 @@ Data * String::encodedMIMEHeaderValueForSubject()
int String::compareWithCaseSensitive(String * otherString, bool caseSensitive)
{
+ if (otherString == NULL) {
+ return 1;
+ }
if ((length() == 0) && (otherString->length() == 0)) {
return 0;
}
@@ -1206,7 +1209,7 @@ int String::compareWithCaseSensitive(String * otherString, bool caseSensitive)
}
if (otherString->unicodeCharacters() == NULL) {
- return -1;
+ return 1;
}
#if DISABLE_ICU