aboutsummaryrefslogtreecommitdiffstats
path: root/builtin.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2015-04-14 15:57:53 +0300
committerArnold D. Robbins <arnold@skeeve.com>2015-04-14 15:57:53 +0300
commit3fc38ff001d5a4345def6ce960918612ed209518 (patch)
tree9fe04e4cabd32d77e8826e295240cdecb42ef3e9 /builtin.c
parenta830a63718f1e9a0a812e772bef6e891668afd17 (diff)
downloadegawk-3fc38ff001d5a4345def6ce960918612ed209518.tar.gz
egawk-3fc38ff001d5a4345def6ce960918612ed209518.tar.bz2
egawk-3fc38ff001d5a4345def6ce960918612ed209518.zip
Another bug fix in strftime.
Diffstat (limited to 'builtin.c')
-rw-r--r--builtin.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/builtin.c b/builtin.c
index f650a9f8..fc670946 100644
--- a/builtin.c
+++ b/builtin.c
@@ -1943,6 +1943,9 @@ do_strftime(int nargs)
else
tm = localtime(& fclock);
+ if (tm == NULL)
+ return make_string("", 0);
+
bufp = buf;
bufsize = sizeof(buf);
for (;;) {