summaryrefslogtreecommitdiff
path: root/libopie2
Side-by-side diff
Diffstat (limited to 'libopie2') (more/less context) (show whitespace changes)
-rw-r--r--libopie2/opienet/onetwork.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/libopie2/opienet/onetwork.cpp b/libopie2/opienet/onetwork.cpp
index ab3e77f..26a6c81 100644
--- a/libopie2/opienet/onetwork.cpp
+++ b/libopie2/opienet/onetwork.cpp
@@ -1006,7 +1006,8 @@ int OWirelessNetworkInterface::signalStrength() const
int lev = stat.qual.level; //FIXME: Do something with them?
int noi = stat.qual.noise; //FIXME: Do something with them?
- return cur*100/max;
+
+ return max != 0 ? cur*100/max: -1;
}