From 2f6ff54e3111835ae41fcbf073dbd90899090be6 Mon Sep 17 00:00:00 2001 From: naruse Date: Sat, 7 Apr 2012 21:53:05 +0000 Subject: [PATCH] * 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 --- ChangeLog | 5 +++++ io.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) 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 + + * 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 * 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++;