Index: battstat-hal.c
===================================================================
RCS file: /cvs/gnome/gnome-applets/battstat/battstat-hal.c,v
retrieving revision 1.4
diff -u -p -r1.4 battstat-hal.c
--- battstat-hal.c	2 Aug 2005 02:17:35 -0000	1.4
+++ battstat-hal.c	4 Sep 2005 23:33:25 -0000
@@ -478,8 +478,17 @@ battstat_hal_get_battery_info( BatterySt
     if( battery->status.discharging )
       on_ac_power = 0;
 
-    /* Sum the totals for current charge, design capacity, (dis)charge rate. */
-    current_charge_total += battery->status.current_level;
+    /* Some ACPI implementations erroneously report a current charge level
+     * that is much higher than the maximum battery capacity when fully
+     * charged.  Correct for this so that we never show more than 100%.
+     * See bug #315259 for more information.
+     */
+    if( battery->status.current_level > battery->status.full_level )
+      current_charge_total += battery->status.full_level;
+    else
+      current_charge_total += battery->status.current_level;
+
+    /* Sum the totals for design capacity, (dis)charge rate. */
     full_capacity_total += battery->status.full_level;
     rate_total += battery->status.rate;
 
