summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Pyne <[email protected]>2016-05-04 22:56:56 -0400
committerMichael Pyne <[email protected]>2016-05-04 22:56:56 -0400
commit4578fe0acef6029c06812d43d45d78d3679f86cd (patch)
tree83331f08abbfab042a076c35c8166498fde82cbc
parentfa545c5a2e0ff59de0c144c76fbf7d9633b4a2a0 (diff)
Fix off-by-one with priority array.
Caught by Coverity, CID 1340882.
-rw-r--r--src/lib/logViewFilterWidget.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/logViewFilterWidget.cpp b/src/lib/logViewFilterWidget.cpp
index 3a3f58a..d97654f 100644
--- a/src/lib/logViewFilterWidget.cpp
+++ b/src/lib/logViewFilterWidget.cpp
@@ -102,7 +102,7 @@ void LogViewWidgetSearchLine::updateSearch(const QString &pattern)
void LogViewWidgetSearchLine::setPriorityEnabled(int priority, bool enabled)
{
- if ((priority < 0) || (priority > Globals::LOG_LEVEL_NUM))
+ if ((priority < 0) || (priority >= Globals::LOG_LEVEL_NUM))
return;
d->priorities[priority] = enabled;
updateSearch(QString());