From 4c7a2cd4fc63f2806a0d0fe771e89ad8ed330f2f Mon Sep 17 00:00:00 2001
From: Ramakrishnan Muthukrishnan <ram@rkrishnan.org>
Date: Tue, 11 Jan 2022 20:21:19 +0530
Subject: [PATCH] null the end of string

---
 rigctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rigctl.c b/rigctl.c
index 99cd219..100c98f 100644
--- a/rigctl.c
+++ b/rigctl.c
@@ -955,7 +955,7 @@ gboolean parse_extended_cmd(char *command, CLIENT *client) {
         // send reply back
         sprintf(reply, "ZZAG%03d;", (int)(active_receiver->volume * 100.0));
         send_resp(client->fd, reply);
-      } else {
+      } else if (command[7] == ';') {
           command[7] = '\0';
           int gain = atoi(&command[4]);
           active_receiver->volume = (double)gain / 100.0;
-- 
2.45.2