On dim., 2011-06-05 at 21:32 +0300, Kim Holviala wrote:
> On 2011-06-05 20:30, Yves-Alexis Perez wrote:
> 
> >> I traced the code a bit and found function xfpm_battery_refresh_icon()
> >> which looks a bit fishy. It's the function that converts battery
> >> percentage to an icon name.
> >
> > So you have a tentative fix ready? I can try testing it, I should have a
> > mostly empty battery and I think force_discharge with laptop plugged
> > should be safe.
> 
> Yup, got a working patch. The bug was just shoddy coding - two if loops 
> with missing final elses and an uninitalizd string icon_name.
> 
> Attached simple patch fixes the if clauses and makes sure the string 
> variable is always defined before returning.

Hmhm, I'm not too sure. I'll have to report that upstream and ask for
advice, but I think it might be better to keep the case and add a new
one for XFPM_DEVICE_STATE_EMPTY, then a fallback.

Regards,
-- 
Yves-Alexis

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to