From 5a6dd55c7ce0d5426c402570bd787b65796439b0 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Sat, 22 Mar 2008 10:45:11 +0100 Subject: [PATCH] wireless plugin: Fix reading the noise value. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Accidentally the wrong value was used as `noise'. This patch fixes it. Thanks to Ondřej Válek for pointing this out. --- src/wireless.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wireless.c b/src/wireless.c index 48705989..285fb744 100644 --- a/src/wireless.c +++ b/src/wireless.c @@ -132,8 +132,8 @@ static int wireless_read (void) power = 1.0; /* invalid */ /* noise [dBm] < 0.0 */ - noise = strtod (fields[3], &endptr); - if (fields[3] == endptr) + noise = strtod (fields[4], &endptr); + if (fields[4] == endptr) noise = 1.0; /* invalid */ else if ((noise >= 0.0) && (noise <= 100.0)) noise = wireless_percent_to_power (noise); -- 2.11.0