From 7188755e6ee1f7435db564dac587c19d0e0c5ced Mon Sep 17 00:00:00 2001 From: erikkaashoek Date: Sun, 23 May 2021 13:13:11 +0200 Subject: [PATCH] Solved error in marker search --- sa_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sa_core.c b/sa_core.c index 452cfc0..fef5423 100644 --- a/sa_core.c +++ b/sa_core.c @@ -2152,7 +2152,7 @@ int index_of_frequency(freq_t f) // Search which index in the frequency tab return -1; if (f > frequencies[sweep_points-1]) return -1; - int i = (f + (f_step >> 1)) / f_step; + int i = ((f - frequencies[0] ) + (f_step >> 1)) / f_step; return i; #if 0 // int R = (sizeof frequencies)/sizeof(int) - 1;