summaryrefslogtreecommitdiff
path: root/time.c
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
commit448154a7daa92447e2446fff517e72b70de6818e (patch)
tree95bc70bced8ef880f1152f5cf97c11db8b93af97 /time.c
parent5b93abf50e01ac2d91a07abe46beb47f10adbab9 (diff)
* time.c (time_strftime): include nul character. fixed: [ruby-dev:29422]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10855 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'time.c')
-rw-r--r--time.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/time.c b/time.c
index 0f178a78eb..3a18bd425d 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;