summaryrefslogtreecommitdiff
path: root/include/utils/String16.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/utils/String16.h')
-rw-r--r--include/utils/String16.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/utils/String16.h b/include/utils/String16.h
index 07a0c1188ec9..d98b2d04ddc1 100644
--- a/include/utils/String16.h
+++ b/include/utils/String16.h
@@ -205,7 +205,9 @@ inline bool String16::operator<=(const String16& other) const
inline bool String16::operator==(const String16& other) const
{
- return strzcmp16(mString, size(), other.mString, other.size()) == 0;
+ const size_t n1 = size();
+ const size_t n2 = other.size();
+ return n1 == n2 && strzcmp16(mString, n1, other.mString, n2) == 0;
}
inline bool String16::operator!=(const String16& other) const