aboutsummaryrefslogtreecommitdiffstats
path: root/qt-models/yearlystatisticsmodel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt-models/yearlystatisticsmodel.cpp')
-rw-r--r--qt-models/yearlystatisticsmodel.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/qt-models/yearlystatisticsmodel.cpp b/qt-models/yearlystatisticsmodel.cpp
index 1cc5a9087..955f0e8ee 100644
--- a/qt-models/yearlystatisticsmodel.cpp
+++ b/qt-models/yearlystatisticsmodel.cpp
@@ -206,7 +206,7 @@ void YearlyStatisticsModel::update_yearly_stats()
/* Show the statistic sorted by dive type */
if (stats_by_type != NULL && stats_by_type[0].selection_size) {
YearStatisticsItem *item = new YearStatisticsItem(stats_by_type[0]);
- for (i = 1; i <= sizeof(dive_comp_type) + 1; ++i) {
+ for (i = 1; i <= NUM_DC_TYPE; ++i) {
if (stats_by_type[i].selection_size == 0)
continue;
YearStatisticsItem *iChild = new YearStatisticsItem(stats_by_type[i]);