aboutsummaryrefslogtreecommitdiffstats
path: root/dcc.c
diff options
context:
space:
mode:
Diffstat (limited to 'dcc.c')
-rw-r--r--dcc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/dcc.c b/dcc.c
index 909fedad..2bb85ad4 100644
--- a/dcc.c
+++ b/dcc.c
@@ -702,7 +702,7 @@ file_transfer_t *dcc_request( struct im_connection *ic, char *line )
/* number means ipv4, something else means ipv6 */
if ( pmatch[6].rm_so > 0 )
{
- struct in_addr ipaddr = { .s_addr = htonl( atoi( input + pmatch[5].rm_so ) ) };
+ struct in_addr ipaddr = { .s_addr = htonl( strtoul( input + pmatch[5].rm_so, NULL, 10 ) ) };
host = inet_ntoa( ipaddr );
} else
{