From 8ebffd20b6afab1977729735947dcd1c6d40dfa6 Mon Sep 17 00:00:00 2001 From: Mike Black W9MDB Date: Mon, 25 Mar 2024 17:50:39 -0500 Subject: [PATCH] Fix get_vfo_info compatibility with Log4OM https://github.com/Hamlib/Hamlib/issues/1531 --- tests/rigctl_parse.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/rigctl_parse.c b/tests/rigctl_parse.c index 5c6a24b76..9dabe4dcd 100644 --- a/tests/rigctl_parse.c +++ b/tests/rigctl_parse.c @@ -1736,8 +1736,12 @@ readline_repeat: " %s", rig_strvfo(vfo)); - p1 == NULL ? a1[0] = '\0' : snprintf(a1, sizeof(a1), "%c%s", - *vfo_opt ? ',' : ' ', p1); + // exception for get_vfo_info cmd which fails with log4om otherwise + if (*vfo_opt && cmd != 0xf3) + p1 == NULL ? a1[0] = '\0' : snprintf(a1, sizeof(a1), ":%s", p1); + else + p1 == NULL ? a1[0] = '\0' : snprintf(a1, sizeof(a1), " %s", p1); + p2 == NULL ? a2[0] = '\0' : snprintf(a2, sizeof(a2), " %s", p2); p3 == NULL ? a3[0] = '\0' : snprintf(a3, sizeof(a3), " %s", p3);