summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--statistics.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/statistics.c b/statistics.c
index fe379505b..047c6ea1e 100644
--- a/statistics.c
+++ b/statistics.c
@@ -290,12 +290,20 @@ static void process_interval_stats(stats_t stats_interval, GtkTreeIter *parent,
add_cell_to_tree(store, "", 12, row);
}
/* Coldest water temperature */
- snprintf(value_str, sizeof(value_str), "%.1f %s\t", value, unit);
- add_cell_to_tree(store, value_str, 13, row);
+ if (value > -100.0) {
+ snprintf(value_str, sizeof(value_str), "%.1f %s\t", value, unit);
+ add_cell_to_tree(store, value_str, 13, row);
+ } else {
+ add_cell_to_tree(store, "", 13, row);
+ }
/* Warmest water temperature */
value = get_temp_units(stats_interval.max_temp, &unit);
- snprintf(value_str, sizeof(value_str), "%.1f %s", value, unit);
- add_cell_to_tree(store, value_str, 14, row);
+ if (value > -100.0) {
+ snprintf(value_str, sizeof(value_str), "%.1f %s", value, unit);
+ add_cell_to_tree(store, value_str, 14, row);
+ } else {
+ add_cell_to_tree(store, "", 14, row);
+ }
}
void clear_statistics()