From c42420319f4bca1927484f6a594c7dac6be53432 Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Wed, 5 May 2004 17:00:58 +0000 Subject: Set the first character of buf to '\1' before the strftime() call so we can try to distinguish a zero-length string from an error return (a minor fix to Peter's patch). --- Src/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Src/utils.c b/Src/utils.c index ee78665c1..67bc28abd 100644 --- a/Src/utils.c +++ b/Src/utils.c @@ -1834,7 +1834,7 @@ ztrftime(char *buf, int bufsize, char *fmt, struct tm *tm) * Remember we've already allowed for two characters * in the accounting in bufsize (but nowhere else). */ - *buf = '\0'; + *buf = '\1'; tmp[1] = fmt[-1]; if (!strftime(buf, bufsize + 2, tmp, tm)) { -- cgit 1.4.1