From c9ec87701e1c5dc9c3bb615eeacb96931535b4e5 Mon Sep 17 00:00:00 2001 From: Markus Uhlin Date: Mon, 2 Mar 2026 22:54:43 +0100 Subject: Replaced atoi() with strtol() --- FICS/matchproc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'FICS/matchproc.c') diff --git a/FICS/matchproc.c b/FICS/matchproc.c index 36f6a4a..1601c5d 100644 --- a/FICS/matchproc.c +++ b/FICS/matchproc.c @@ -42,6 +42,7 @@ #include #include +#include #include #include "board.h" @@ -725,7 +726,7 @@ com_match(int p, param_list param) } if (param[1].type != TYPE_NULL) { - int numba; // temp for atoi() + int numba; val = param[1].val.string; @@ -737,7 +738,8 @@ com_match(int p, param_list param) if (category[0] != '\0' && board[0] == '\0') { strlcpy(board, parsebuf, sizeof board); } else if (isdigit(*parsebuf)) { - if ((numba = atoi(parsebuf)) < 0) { + if ((numba = (int)strtol(parsebuf, + (char **)NULL, 10)) < 0) { pprintf(p, "You can't specify " "negative time controls." "\n"); -- cgit v1.2.3