* pack.c (pack_pack): fix i! with big endian. [1].pack("i!") was
"\0\0\0\0". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18105 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
fae330b3b9
commit
871c83dddf
@ -1,3 +1,8 @@
|
||||
Thu Jul 17 20:35:03 2008 Yusuke Endoh <mame@tsg.ne.jp>
|
||||
|
||||
* pack.c (pack_pack): fix i! with big endian. [1].pack("i!") was
|
||||
"\0\0\0\0".
|
||||
|
||||
Thu Jul 17 16:48:40 2008 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||
|
||||
* ext/socket/socket.c (ruby_connect): select() for connect() has
|
||||
|
4
pack.c
4
pack.c
@ -691,11 +691,11 @@ pack_pack(VALUE ary, VALUE fmt)
|
||||
case 'i': /* signed int */
|
||||
case 'I': /* unsigned int */
|
||||
while (len-- > 0) {
|
||||
long i;
|
||||
int i;
|
||||
|
||||
from = NEXTFROM;
|
||||
i = num2i32(from);
|
||||
rb_str_buf_cat(res, OFF32(&i), NATINT_LEN(int,4));
|
||||
rb_str_buf_cat(res, (char*)&i, sizeof(int));
|
||||
}
|
||||
break;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user