* io.c (io_unread): cast as long the value for extra_max.
[ruby-core:44137] [Bug #6257] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35255 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
0304254bba
commit
2f6ff54e31
@ -1,3 +1,8 @@
|
|||||||
|
Sun Apr 8 06:51:57 2012 NARUSE, Yui <naruse@ruby-lang.org>
|
||||||
|
|
||||||
|
* io.c (io_unread): cast as long the value for extra_max.
|
||||||
|
[ruby-core:44137] [Bug #6257]
|
||||||
|
|
||||||
Sun Apr 8 06:46:48 2012 NARUSE, Yui <naruse@ruby-lang.org>
|
Sun Apr 8 06:46:48 2012 NARUSE, Yui <naruse@ruby-lang.org>
|
||||||
|
|
||||||
* lib/webrick/httpresponse.rb (WEBrick::HTTPResponse#send_body_io):
|
* lib/webrick/httpresponse.rb (WEBrick::HTTPResponse#send_body_io):
|
||||||
|
2
io.c
2
io.c
@ -455,7 +455,7 @@ io_unread(rb_io_t *fptr)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* add extra offset for removed '\r' in rbuf */
|
/* add extra offset for removed '\r' in rbuf */
|
||||||
extra_max = pos - fptr->rbuf.len;
|
extra_max = (long)(pos - fptr->rbuf.len);
|
||||||
p = fptr->rbuf.ptr + fptr->rbuf.off;
|
p = fptr->rbuf.ptr + fptr->rbuf.off;
|
||||||
for (i = 0; i < fptr->rbuf.len; i++) {
|
for (i = 0; i < fptr->rbuf.len; i++) {
|
||||||
if (*p == '\n') newlines++;
|
if (*p == '\n') newlines++;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user