summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-04-07 21:53:05 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-04-07 21:53:05 +0000
commit2f6ff54e3111835ae41fcbf073dbd90899090be6 (patch)
treebc03f63be0f4742dcbfad7cd803461303e7a9500
parent0304254bba87d2a922c66a4e145f43744b2e7823 (diff)
* 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
-rw-r--r--ChangeLog5
-rw-r--r--io.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index e7b0fdf8ee..966b72fcbb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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):
diff --git a/io.c b/io.c
index fac42c710b..ca7f1b2e92 100644
--- a/io.c
+++ b/io.c
@@ -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++;