summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2009-06-24 13:17:03 +0200
committerThiago Macieira <thiago.macieira@nokia.com>2009-06-24 13:58:41 +0200
commita6b97b648a4c42b4bb5b75dcc6edceefa68bc347 (patch)
tree2cdfddf3d57bc93cdac89036d53630bf35491ffb /src/corelib
parent687fed8c198a6a35b4e43f4993027e4a62470fe6 (diff)
Fix comparison of different-sized QStringRefs.
Two strings are only equal if they have the same size. Task-number: 256763 Reviewed-by: TrustMe
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/tools/qstring.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp
index 7e1f6c7551..9427ca3dec 100644
--- a/src/corelib/tools/qstring.cpp
+++ b/src/corelib/tools/qstring.cpp
@@ -169,7 +169,7 @@ static int ucstricmp(const ushort *a, const ushort *ae, const uchar *b)
// Unicode case-insensitive comparison
static int ucstrcmp(const QChar *a, int alen, const QChar *b, int blen)
{
- if (a == b)
+ if (a == b && alen == blen)
return 0;
int l = qMin(alen, blen);
while (l-- && *a == *b)