diff --git a/src/bin/ui.c b/src/bin/ui.c index 7b2eef2..9d912ad 100644 --- a/src/bin/ui.c +++ b/src/bin/ui.c @@ -269,7 +269,7 @@ _ui_all(void) key_func("Escape"); } for (i = 1; - (i < ((sizeof(weights) / sizeof(double)) - 1)) && + (i < (1 + t_count)) && (weights[i] > 0.0); i++) avgw += weights[i];