From 7c5000bc2cdb78d99a02fab1496ebdef31a0e9bd Mon Sep 17 00:00:00 2001 From: eban Date: Mon, 26 Mar 2001 14:29:57 +0000 Subject: * time.c (rb_strftime): check whether strftime returns empty string. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1285 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- time.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'time.c') diff --git a/time.c b/time.c index a06f1abf2..150df2da2 100644 --- a/time.c +++ b/time.c @@ -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'; -- cgit