From 11a3479b2a944d429bdd89fdc4aa13f3ef9c9a8e Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Fri, 23 Oct 2015 17:33:40 +0200 Subject: Fix potential access beyond array end. Change-Id: I81b3903858a9072ba2a4ac9e2df572c02fdb9281 Reviewed-by: Christian Stenger --- plugins/autotest/testtreeitem.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(type) >= sizeof(icons)) + if (int(type) >= int(sizeof icons / sizeof *icons)) return icons[2]; return icons[type]; } -- cgit v1.2.1