about summary refs log tree commit diff
diff options
context:
space:
mode:
authorWayne Davison <wayned@users.sourceforge.net>2004-05-05 17:00:58 +0000
committerWayne Davison <wayned@users.sourceforge.net>2004-05-05 17:00:58 +0000
commitc42420319f4bca1927484f6a594c7dac6be53432 (patch)
tree20cd1c4f5b2c200ede8c7236ad0afc1ccc1230ff
parentf57f65282b8b7de7db638eaabd06867ea8b1162f (diff)
downloadzsh-c42420319f4bca1927484f6a594c7dac6be53432.tar.gz
zsh-c42420319f4bca1927484f6a594c7dac6be53432.tar.xz
zsh-c42420319f4bca1927484f6a594c7dac6be53432.zip
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).
-rw-r--r--Src/utils.c2
1 files changed, 1 insertions, 1 deletions
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))
 		{