]> git.rkrishnan.org Git - pihpsdr.git/commitdiff
null the end of string
authorRamakrishnan Muthukrishnan <ram@rkrishnan.org>
Tue, 11 Jan 2022 14:51:19 +0000 (20:21 +0530)
committerRamakrishnan Muthukrishnan <ram@rkrishnan.org>
Tue, 11 Jan 2022 14:51:19 +0000 (20:21 +0530)
rigctl.c

index 99cd2196b81a3d5a260ff8e7a42c1840439bd162..100c98fad7d8c5d2120242eba9cf057513be9c19 100644 (file)
--- 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;