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
commitce1ed4a40db855af3842d29ef304cf9aecd4a5c1 (patch)
tree018deed4b2968106270fc9c10346f42c768ee7ff
parentf7eadd68d24f4ba3ed1fd310d6205882ef32e643 (diff)
downloadruby-ce1ed4a40db855af3842d29ef304cf9aecd4a5c1.tar.gz
ruby-ce1ed4a40db855af3842d29ef304cf9aecd4a5c1.tar.xz
ruby-ce1ed4a40db855af3842d29ef304cf9aecd4a5c1.zip
* time.c (time_strftime): include nul character. fixed: [ruby-dev:29422]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@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 20cf02993..3a030d237 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:29:33 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
* lib/cgi.rb (CGI::out): specify -m0 -x option for nkf.
diff --git a/time.c b/time.c
index 03d9076ce..11443e395 100644
--- a/time.c
+++ b/time.c
@@ -1860,7 +1860,7 @@ time_strftime(time, 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;