fix weight calcs!

SVN revision: 56252
This commit is contained in:
Carsten Haitzler 2011-01-21 07:04:26 +00:00
parent 04ed2e9e8b
commit 0eb947b47b
1 changed files with 4 additions and 1 deletions

View File

@ -229,7 +229,10 @@ _ui_all(void)
wfps += (p_fps * weights[t_count]);
key_func("Escape");
}
for (i = 1; i < ((sizeof(weights) / sizeof(double)) - 1); i++)
for (i = 1;
(i < ((sizeof(weights) / sizeof(double)) - 1)) &&
(weights[i] > 0.0);
i++)
avgw += weights[i];
avgw /= (i - 1);
if (t_count > 0)