diff options
author | Andrew J. Schorr <aschorr@telemetry-investments.com> | 2016-06-14 15:30:33 -0400 |
---|---|---|
committer | Andrew J. Schorr <aschorr@telemetry-investments.com> | 2016-06-14 15:30:33 -0400 |
commit | 56b1798777fe5464014fca3f9744ebdb950b8348 (patch) | |
tree | 9817fa39e7dd200921322771c7ba3b84ff4b44a1 /builtin.c | |
parent | e8ba153719506aabfffc911d2519727a3bfc5a36 (diff) | |
download | egawk-56b1798777fe5464014fca3f9744ebdb950b8348.tar.gz egawk-56b1798777fe5464014fca3f9744ebdb950b8348.tar.bz2 egawk-56b1798777fe5464014fca3f9744ebdb950b8348.zip |
Fix strftime 3rd argument to behave like a standard boolean: non-null or non-zero.
Diffstat (limited to 'builtin.c')
-rw-r--r-- | builtin.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1928,9 +1928,9 @@ do_strftime(int nargs) NODE *tmp; if (nargs == 3) { - t3 = POP_SCALAR(); - if ((t3->flags & (NUMCUR|NUMBER)) != 0) - do_gmt = (t3->numbr != 0); + t3 = fixtype(POP_SCALAR()); + if ((t3->flags & NUMBER) != 0) + do_gmt = ! iszero(t3); else do_gmt = (t3->stlen > 0); DEREF(t3); |