Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : apps/e

Dir     : e17/apps/e/src/modules/battery


Modified Files:
        batget.c 


Log Message:
Integer overflow.

This fixes my battery showing 18% for on power, fully charged battery,
but possible there are many more of those.


===================================================================
RCS file: /cvs/e/e17/apps/e/src/modules/battery/batget.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- batget.c    3 Mar 2008 14:35:26 -0000       1.4
+++ batget.c    4 Mar 2008 01:06:58 -0000       1.5
@@ -770,7 +770,7 @@
             total_pwr_max += pwr_full - pwr_empty;
          }
        if (total_pwr_max > 0)
-         battery_full = (total_pwr_now * 100) / total_pwr_max;
+         battery_full = ((long long)total_pwr_now * 100) / total_pwr_max;
      }
 }
 



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to