summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-09-04 12:14:47 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-09-04 12:14:47 +0000
commita419b1dd33d0ab724f51098654699af0e895c3ec (patch)
tree95bc70bced8ef880f1152f5cf97c11db8b93af97
parent662325161452172a99656fb2507bae3594d54e0f (diff)
downloadruby-a419b1dd33d0ab724f51098654699af0e895c3ec.tar.gz
ruby-a419b1dd33d0ab724f51098654699af0e895c3ec.tar.xz
ruby-a419b1dd33d0ab724f51098654699af0e895c3ec.zip
* time.c (time_strftime): include nul character. fixed: [ruby-dev:29422]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@10855 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog4
-rw-r--r--time.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 466cb0398..c46e3dba1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Mon Sep 4 21:14:20 2006 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * time.c (time_strftime): include nul character. fixed: [ruby-dev:29422]
+
Mon Sep 4 16:39:11 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
* lib/cgi.rb (CGI::out): specify -x option for nkf.
diff --git a/time.c b/time.c
index 0f178a78e..3a18bd425 100644
--- a/time.c
+++ b/time.c
@@ -1886,7 +1886,7 @@ time_strftime(VALUE time, VALUE format)
while (p < pe) {
len = rb_strftime(&buf, p, &tobj->tm);
rb_str_cat(str, buf, len);
- p += strlen(p) + 1;
+ p += strlen(p);
if (buf != buffer) {
free(buf);
buf = buffer;