forked from enlightenment/enlightenment
Integer overflow.
This fixes my battery showing 18% for on power, fully charged battery, but possible there are many more of those. SVN revision: 33910
This commit is contained in:
parent
55b40f3d3b
commit
617ab30c56
|
@ -770,7 +770,7 @@ linux_sys_class_power_supply_check(void)
|
||||||
total_pwr_max += pwr_full - pwr_empty;
|
total_pwr_max += pwr_full - pwr_empty;
|
||||||
}
|
}
|
||||||
if (total_pwr_max > 0)
|
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue