aboutsummaryrefslogtreecommitdiffstats
path: root/dcc.c
diff options
context:
space:
mode:
authorulim <a.sporto+bee@gmail.com>2008-08-11 01:51:48 +0200
committerulim <a.sporto+bee@gmail.com>2008-08-11 01:51:48 +0200
commit92f4ec5d9d480247281c50c163c19b1ea438c1b3 (patch)
treef2793e5ed66674505d93319853bd1e553d9482ee /dcc.c
parenta2b99ec7a1a02c57b2ef44663e56bdfab6063a4f (diff)
fixes bug on 32bit archs in DCC code.
Shouldn't atoi be the same on 64 and 32bits? Strange.
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
{