diff options
author | eban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-03-26 14:29:57 +0000 |
---|---|---|
committer | eban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-03-26 14:29:57 +0000 |
commit | 2559f0d90ddf45f6cbaadc69a7a2fd7a3bfbf8a0 (patch) | |
tree | fd5a25c91ac837396b23ad4b0227ff8ba9b10e83 /time.c | |
parent | 253f65aa4ed7e67bf7f11d87dcebc4f87888a3d8 (diff) |
* time.c (rb_strftime): check whether strftime returns empty string.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1285 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'time.c')
-rw-r--r-- | time.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -893,7 +893,7 @@ rb_strftime(buf, format, time) return 0; } len = strftime(*buf, SMALLBUF, format, time); - if (len != 0) return len; + if (len != 0 || **buf == '\0') return len; for (size=1024; ; size*=2) { *buf = xmalloc(size); (*buf)[0] = '\0'; |