From ff38a59e09fdf9ebdc0c73693a844307f9ad49d7 Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Fri, 7 Jun 2024 21:14:13 +0200 Subject: [PATCH] hfp: fix command lookup --- src/classic/hfp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/classic/hfp.c b/src/classic/hfp.c index 278e50630..802f37caf 100644 --- a/src/classic/hfp.c +++ b/src/classic/hfp.c @@ -1257,7 +1257,7 @@ static hfp_command_t parse_command(const char * line_buffer, int isHandsFree){ int match = strcmp(line_buffer, entry->command); if (match < 0){ // search term is lower than middle element - if (right == 0) break; + if (middle == 0) break; right = middle - 1; } else if (match == 0){ return entry->command_id;