mirror of
https://github.com/ruby/ruby.git
synced 2025-09-17 01:23:57 +02:00
* ext/socket/socket.c (host_str): numeric address should be unsigned.
[ruby-core:18971] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@19593 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
78cb1342c0
commit
90b51e9986
3 changed files with 9 additions and 4 deletions
|
@ -840,7 +840,7 @@ host_str(host, hbuf, 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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue