* 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:
parent
1b2af065a2
commit
27bf963fa8
@ -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>
|
Wed Jul 16 18:04:34 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* signal.c (signal_exec, trap_handler): trap accepts a string as
|
* signal.c (signal_exec, trap_handler): trap accepts a string as
|
||||||
|
2
io.c
2
io.c
@ -1762,7 +1762,7 @@ appendline(rb_io_t *fptr, int delim, VALUE *strp, long *lp)
|
|||||||
}
|
}
|
||||||
if (limit > 0 && limit == pending) {
|
if (limit > 0 && limit == pending) {
|
||||||
char *p = fptr->rbuf+fptr->rbuf_off;
|
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);
|
char *pl = rb_enc_left_char_head(p, pp, enc);
|
||||||
|
|
||||||
if (pl < pp) {
|
if (pl < pp) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user