fix weight calcs!
authorraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 21 Jan 2011 07:04:26 +0000 (07:04 +0000)
committerraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 21 Jan 2011 07:04:26 +0000 (07:04 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/expedite@56252 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/bin/ui.c

index 235e78e..b579c50 100644 (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)