summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qtexthtmlparser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/text/qtexthtmlparser.cpp')
-rw-r--r--src/gui/text/qtexthtmlparser.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/text/qtexthtmlparser.cpp b/src/gui/text/qtexthtmlparser.cpp
index 7bca50325c..d18d432f46 100644
--- a/src/gui/text/qtexthtmlparser.cpp
+++ b/src/gui/text/qtexthtmlparser.cpp
@@ -60,7 +60,7 @@ QT_BEGIN_NAMESPACE
// see also tst_qtextdocumentfragment.cpp
#define MAX_ENTITY 258
-static const struct QTextHtmlEntity { const char *name; quint16 code; } entities[MAX_ENTITY]= {
+static const struct QTextHtmlEntity { const char name[9]; quint16 code; } entities[]= {
{ "AElig", 0x00c6 },
{ "AMP", 38 },
{ "Aacute", 0x00c1 },
@@ -320,6 +320,7 @@ static const struct QTextHtmlEntity { const char *name; quint16 code; } entities
{ "zwj", 0x200d },
{ "zwnj", 0x200c }
};
+Q_STATIC_ASSERT(MAX_ENTITY == sizeof entities / sizeof *entities);
#if defined(Q_CC_MSVC) && _MSC_VER < 1600
bool operator<(const QTextHtmlEntity &entity1, const QTextHtmlEntity &entity2)