From 5902013ad19a24ebb0fc053b708c34ead7df38a4 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Sat, 19 Dec 2009 20:43:43 -0800 Subject: [PATCH] fmscan: Correctly calculate percentages for display during scan. The final percentages were already correct, but the ones displayed during the scan were off. --- fmscan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fmscan.c b/fmscan.c index 0ef092d..2b24f0b 100644 --- a/fmscan.c +++ b/fmscan.c @@ -151,7 +151,7 @@ int main(int argc, char **argv) totsig = 0; for (i = 0; i < tries; i++) { totsig += tuner_get_signal(&tuner); - perc = totsig / (65535.0 * i); + perc = totsig / (65535.0 * (i + 1)); if (!quiet) { printf("%2.1f: checking: %3.1f%% (%d/%d)" " \r", -- 2.11.4.GIT