From 0054cd575f1b0dd14437ca8e5eeb1b06241cd3a9 Mon Sep 17 00:00:00 2001 From: Rom Walton Date: Thu, 27 Jan 2005 20:04:58 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=5225 --- client/win/hostinfo_win.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/win/hostinfo_win.cpp b/client/win/hostinfo_win.cpp index 3ab16a0791..1f95494e93 100755 --- a/client/win/hostinfo_win.cpp +++ b/client/win/hostinfo_win.cpp @@ -380,8 +380,8 @@ bool HOST_INFO::host_is_running_on_batteries() { // battery is charging or missing and make that part // of the decision. bool bIsOnBatteryPower = (pStatus.ACLineStatus != 1); - bool bIsBatteryCharging = (pStatus.BatteryFlag & 8) - bool bIsBatteryMissing = (pStatus.BatteryFlag & 128) + bool bIsBatteryCharging = ((pStatus.BatteryFlag & 8) == 8); + bool bIsBatteryMissing = ((pStatus.BatteryFlag & 128) == 128); return (bIsOnBatteryPower && !bIsBatteryCharging && !bIsBatteryMissing); }