diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2011-10-28 14:10:11 +0200 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2011-10-28 14:10:11 +0200 |
commit | 69239a8fd65ad7f55cc2d567c933a800d5d10fac (patch) | |
tree | 560d1763f434161d6517647e61d750b8a013a3fe /builtin.c | |
parent | 44cd8b0b374419f77febc504b0053b87c894810c (diff) | |
parent | 8daacca02f8ae18ff1e2cdd38fbc01985b045432 (diff) | |
download | egawk-69239a8fd65ad7f55cc2d567c933a800d5d10fac.tar.gz egawk-69239a8fd65ad7f55cc2d567c933a800d5d10fac.tar.bz2 egawk-69239a8fd65ad7f55cc2d567c933a800d5d10fac.zip |
Merge branch 'gawk-4.0-stable'
Diffstat (limited to 'builtin.c')
-rw-r--r-- | builtin.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -1634,6 +1634,7 @@ do_strftime(int nargs) NODE *t1, *t2, *t3, *ret; struct tm *tm; time_t fclock; + long clock_val; char *bufp; size_t buflen, bufsize; char buf[BUFSIZ]; @@ -1680,9 +1681,10 @@ do_strftime(int nargs) t2 = POP_SCALAR(); if (do_lint && (t2->flags & (NUMCUR|NUMBER)) == 0) lintwarn(_("strftime: received non-numeric second argument")); - fclock = (time_t) force_number(t2); - if (((long int) fclock) < 0) + clock_val = (long) force_number(t2); + if (clock_val < 0) fatal(_("strftime: second argument less than 0 or too big for time_t")); + fclock = (time_t) clock_val; DEREF(t2); } |