diff options
author | Christian Kandeler <christian.kandeler@theqtcompany.com> | 2015-10-23 17:33:40 +0200 |
---|---|---|
committer | Christian Stenger <christian.stenger@theqtcompany.com> | 2015-10-26 14:30:05 +0000 |
commit | 11a3479b2a944d429bdd89fdc4aa13f3ef9c9a8e (patch) | |
tree | 81a1ef14fa9b8a38f5828ea6239da11b06049e8b | |
parent | 0749d66362ff96b0792fefb9b7c79409cb6d02b5 (diff) | |
download | qt-creator-11a3479b2a944d429bdd89fdc4aa13f3ef9c9a8e.tar.gz |
Fix potential access beyond array end.
Change-Id: I81b3903858a9072ba2a4ac9e2df572c02fdb9281
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
-rw-r--r-- | plugins/autotest/testtreeitem.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/autotest/testtreeitem.cpp b/plugins/autotest/testtreeitem.cpp index 4dc78f3aa1..6c29f886e8 100644 --- a/plugins/autotest/testtreeitem.cpp +++ b/plugins/autotest/testtreeitem.cpp @@ -73,7 +73,7 @@ static QIcon testTreeIcon(TestTreeItem::Type type) QIcon(QLatin1String(":/images/func.png")), QIcon(QLatin1String(":/images/data.png")) }; - if (static_cast<unsigned long>(type) >= sizeof(icons)) + if (int(type) >= int(sizeof icons / sizeof *icons)) return icons[2]; return icons[type]; } |