diff options
author | Wayne Davison <wayned@users.sourceforge.net> | 2004-05-05 17:00:58 +0000 |
---|---|---|
committer | Wayne Davison <wayned@users.sourceforge.net> | 2004-05-05 17:00:58 +0000 |
commit | c42420319f4bca1927484f6a594c7dac6be53432 (patch) | |
tree | 20cd1c4f5b2c200ede8c7236ad0afc1ccc1230ff | |
parent | f57f65282b8b7de7db638eaabd06867ea8b1162f (diff) | |
download | zsh-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.c | 2 |
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)) { |