diff options
Diffstat (limited to 'modules/devices/battery.c')
-rw-r--r-- | modules/devices/battery.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/devices/battery.c b/modules/devices/battery.c index 784a6cc5..7e7bad7b 100644 --- a/modules/devices/battery.c +++ b/modules/devices/battery.c @@ -315,6 +315,7 @@ __scan_battery_apm(void) int c=fscanf(procapm, "%s %s %s 0x%x %s %s %d%%", apm_drv_ver, apm_bios_ver, trash, &ac_bat, trash, trash, &percentage); + if(c!=7) return; fclose(procapm); if (last_time == 0) { |