From 1bb52198766bd3acbfd1fe5010e2d52817b64030 Mon Sep 17 00:00:00 2001
From: Ramakrishnan Muthukrishnan <ram@rkrishnan.org>
Date: Wed, 12 Jan 2022 12:27:18 +0530
Subject: [PATCH] strtol instead of atoi

---
 rigctl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/rigctl.c b/rigctl.c
index b09a497..c2b7812 100644
--- a/rigctl.c
+++ b/rigctl.c
@@ -1824,8 +1824,8 @@ gboolean parse_extended_cmd(char *command, CLIENT *client) {
             send_resp(client->fd, reply);
         } else if (command[7] == ';') {
             command[7] = '\0';
-            double gain = (double)atoi(&command[4]);
-            gain = (((gain / 100.0) * 62.0) - 12.0);
+            double gain = (double)strtol(&command[4], NULL, 10);
+            gain = (gain * 62.0 / 100.0) - 12.0;
             set_mic_gain(gain);
         }
         break;
-- 
2.45.2