diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | time.c | 2 |
2 files changed, 5 insertions, 1 deletions
@@ -1,3 +1,7 @@ +Mon Mar 26 23:19:33 2001 WATANABE Hirofumi <eban@ruby-lang.org> + + * time.c (rb_strftime): check whether strftime returns empty string. + Mon Mar 26 21:16:56 2001 Shugo Maeda <shugo@ruby-lang.org> * lib/net/imap.rb: supports response handlers and multiple commands. @@ -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'; |