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

* io.c (appendline): remove invalid access.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18085 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
mame 2008-07-16 16:30:12 +00:00
parent 1b2af065a2
commit 27bf963fa8
2 changed files with 5 additions and 1 deletions

View file

@ -1,3 +1,7 @@
Thu Jul 17 01:27:38 2008 Yusuke Endoh <mame@tsg.ne.jp>
* io.c (appendline): remove invalid access.
Wed Jul 16 18:04:34 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
* signal.c (signal_exec, trap_handler): trap accepts a string as

2
io.c
View file

@ -1762,7 +1762,7 @@ appendline(rb_io_t *fptr, int delim, VALUE *strp, long *lp)
}
if (limit > 0 && limit == pending) {
char *p = fptr->rbuf+fptr->rbuf_off;
char *pp = p + limit;
char *pp = p + limit - 1;
char *pl = rb_enc_left_char_head(p, pp, enc);
if (pl < pp) {