From: Ramakrishnan Muthukrishnan Date: Wed, 12 Jan 2022 07:07:03 +0000 (+0530) Subject: small fixes in audio gain X-Git-Url: https://git.rkrishnan.org/%5B/%5D%20/file/$top_link?a=commitdiff_plain;h=a5805bde83c887c0c2000ae55a7bf61b9150fbc7;p=pihpsdr.git small fixes in audio gain --- diff --git a/rigctl.c b/rigctl.c index c2b7812..7c61622 100644 --- a/rigctl.c +++ b/rigctl.c @@ -953,11 +953,12 @@ gboolean parse_extended_cmd(char *command, CLIENT *client) { // read/set audio gain if (command[4] == ';') { // send reply back + memset(reply, '\0', 9); sprintf(reply, "ZZAG%03d;", (int)(active_receiver->volume * 100.0)); send_resp(client->fd, reply); } else if (command[7] == ';') { command[7] = '\0'; - int gain = atoi(&command[4]); + int gain = strtol(&command[4], NULL, 10); active_receiver->volume = (double)gain / 100.0; update_af_gain(); }