Commit 11a3479b authored by Christian Kandeler's avatar Christian Kandeler Committed by Christian Stenger
Browse files

Fix potential access beyond array end.



Change-Id: I81b3903858a9072ba2a4ac9e2df572c02fdb9281
Reviewed-by: default avatarChristian Stenger <christian.stenger@theqtcompany.com>
parent 0749d663
......@@ -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];
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment