From 7b95dfac18eb990cdedb4610ea09f2dc1a55a69c Mon Sep 17 00:00:00 2001 From: eban Date: Fri, 17 Nov 2000 05:59:45 +0000 Subject: eban git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 4 ++++ string.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 0dcdf99ec..ee3c4ab0d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Fri Nov 17 14:55:18 2000 WATANABE Hirofumi + + * string.c (rb_str_succ): output should be NUL terminated. + Fri Nov 17 02:54:15 2000 Yukihiro Matsumoto * io.c (rb_io_close): need not to flush before closing. diff --git a/string.c b/string.c index 46f9725ce..e068e4487 100644 --- a/string.c +++ b/string.c @@ -829,7 +829,7 @@ rb_str_succ(orig) memmove(s+1, s, RSTRING(str)->len - n); *s = c; RSTRING(str)->len += 1; - + RSTRING(str)->ptr[RSTRING(str)->len] = '\0'; } return str; -- cgit