aboutsummaryrefslogtreecommitdiff
path: root/run.c
diff options
context:
space:
mode:
authoronetrueawk <bwkster@gmail.com>2019-01-21 14:00:32 -0500
committerGitHub <noreply@github.com>2019-01-21 14:00:32 -0500
commit3222d96844719666e9e37630666821c0a06cdc48 (patch)
treeb2207c1744f7739db407db44ff1c9a3ec8059874 /run.c
parente26237434fb769d9c1ea239101eb5b24be588eea (diff)
parent40b9214d2a2098c6c8e76a85e6eedc990ca4d73f (diff)
downloadone-true-awk-3222d96844719666e9e37630666821c0a06cdc48.tar.gz
Merge branch 'master' into assign-expr
Diffstat (limited to 'run.c')
-rw-r--r--run.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/run.c b/run.c
index 14b0e21..6965117 100644
--- a/run.c
+++ b/run.c
@@ -863,6 +863,9 @@ int format(char **pbuf, int *pbufsize, const char *s, Node *a) /* printf-like co
FATAL("'$' not permitted in awk formats");
}
if (*s == '*') {
+ if (a == NULL) {
+ FATAL("not enough args in printf(%s)", os);
+ }
x = execute(a);
a = a->nnext;
sprintf(t-1, "%d", fmtwd=(int) getfval(x));