1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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:
naruse 2012-04-07 21:53:05 +00:00
parent 0304254bba
commit 2f6ff54e31
2 changed files with 6 additions and 1 deletions

View file

@ -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>
* lib/webrick/httpresponse.rb (WEBrick::HTTPResponse#send_body_io):

2
io.c
View file

@ -455,7 +455,7 @@ io_unread(rb_io_t *fptr)
}
/* 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;
for (i = 0; i < fptr->rbuf.len; i++) {
if (*p == '\n') newlines++;