summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2009-06-24 11:17:03 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2009-06-24 11:58:41 (GMT)
commita6b97b648a4c42b4bb5b75dcc6edceefa68bc347 (patch)
tree2cdfddf3d57bc93cdac89036d53630bf35491ffb /src/corelib
parent687fed8c198a6a35b4e43f4993027e4a62470fe6 (diff)
downloadQt-a6b97b648a4c42b4bb5b75dcc6edceefa68bc347.zip
Qt-a6b97b648a4c42b4bb5b75dcc6edceefa68bc347.tar.gz
Qt-a6b97b648a4c42b4bb5b75dcc6edceefa68bc347.tar.bz2
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 7e1f6c7..9427ca3 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)