summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2014-02-25 14:35:46 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-02-26 14:18:48 +0100
commitc453571d753160313a8dcb3f3aa4667c34616a8f (patch)
tree00ff7959f95a64dfdc24aad299b92dddbbdbcea0 /src
parentb1a882f178d71d1462b5ee7e7ffde142928b5086 (diff)
CSS parser: fix the pseudo-classes array length
The pseudoclass array is declared with length "NumPseudos - 1", but the declaration has actually 44 elements, not 45. This caused a zero-initialized last element to be silently appended to the array. The zero-initialized element broke the sorting of the array, which in turn broke std::lower_bound usage (although of course the problem was there from before switching to the standard library algorithms). Task-number: QTBUG-36933 Change-Id: I8a02891fc36761b6ae72d15a0a8d6c6a96813947 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Diffstat (limited to 'src')
-rw-r--r--src/gui/text/qcssparser_p.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/text/qcssparser_p.h b/src/gui/text/qcssparser_p.h
index b087a2384a..123a53c5cc 100644
--- a/src/gui/text/qcssparser_p.h
+++ b/src/gui/text/qcssparser_p.h
@@ -508,7 +508,7 @@ const quint64 PseudoClass_EditFocus = Q_UINT64_C(0x0000080000000000);
const quint64 PseudoClass_Alternate = Q_UINT64_C(0x0000100000000000);
// The Any specifier is never generated, but can be used as a wildcard in searches.
const quint64 PseudoClass_Any = Q_UINT64_C(0x0000ffffffffffff);
-const int NumPseudos = 46;
+const int NumPseudos = 45;
struct Pseudo
{