diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-09-26 18:12:43 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-09-26 18:12:43 +0000 |
commit | 34c7492e2ceb5eb65b445cd64cbf7a9a70b32a81 (patch) | |
tree | 100ff13e181e8062e55c9e85b38eafad4a0a2b35 /ext/socket | |
parent | 77a9d7c32f8a8b74c63e999af8e5c11506dee8e2 (diff) |
* ext/socket/socket.c (host_str): numeric address should be unsigned.
[ruby-core:18971]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19593 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket')
-rw-r--r-- | ext/socket/socket.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/socket/socket.c b/ext/socket/socket.c index 698bc60996..c2e57850c9 100644 --- a/ext/socket/socket.c +++ b/ext/socket/socket.c @@ -869,7 +869,7 @@ host_str(VALUE host, char *hbuf, size_t len) return NULL; } else if (rb_obj_is_kind_of(host, rb_cInteger)) { - long i = NUM2LONG(host); + unsigned long i = NUM2ULONG(host); make_inetaddr(htonl(i), hbuf, len); return hbuf; |