aboutsummaryrefslogtreecommitdiffstats
path: root/builtin.c
diff options
context:
space:
mode:
authorAndrew J. Schorr <aschorr@telemetry-investments.com>2016-06-20 10:10:30 -0400
committerAndrew J. Schorr <aschorr@telemetry-investments.com>2016-06-20 10:10:30 -0400
commit2d2744ec74076d29e94a2a004e308f73a86b9fa5 (patch)
tree0238d94fc263fd3cc6b2b9e5dc62204e5a985d5a /builtin.c
parent239d7cc07ec54ec7a69805f9a674bfbbbd72f9b1 (diff)
downloadegawk-2d2744ec74076d29e94a2a004e308f73a86b9fa5.tar.gz
egawk-2d2744ec74076d29e94a2a004e308f73a86b9fa5.tar.bz2
egawk-2d2744ec74076d29e94a2a004e308f73a86b9fa5.zip
Call fixtype in a few more places to make sure we check types properly.
Diffstat (limited to 'builtin.c')
-rw-r--r--builtin.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin.c b/builtin.c
index 7ef5d3a1..67b963e7 100644
--- a/builtin.c
+++ b/builtin.c
@@ -1915,7 +1915,7 @@ do_strftime(int nargs)
unref(sub);
if (val != NULL) {
- if (do_lint && (val->flags & STRING) == 0)
+ if (do_lint && (fixtype(val)->flags & STRING) == 0)
lintwarn(_("strftime: format value in PROCINFO[\"strftime\"] has numeric type"));
val = force_string(val);
format = val->stptr;
@@ -2197,7 +2197,7 @@ do_print(int nargs, int redirtype)
if (tmp->type == Node_typedregex)
args_array[i] = force_string(tmp);
- else if ((tmp->flags & (NUMBER|STRING)) == NUMBER) {
+ else if ((fixtype(tmp)->flags & (NUMBER|STRING)) == NUMBER) {
if (OFMTidx == CONVFMTidx)
args_array[i] = force_string(tmp);
else