diff options
author | Christian Neukirchen <chneukirchen@gmail.com> | 2015-11-14 16:35:35 +0100 |
---|---|---|
committer | Christian Neukirchen <chneukirchen@gmail.com> | 2015-11-14 16:35:35 +0100 |
commit | 630132a6435f55963747d4f1f2e26b80eb795484 (patch) | |
tree | f0fbc0f610e09cebc6ccf83ae98500a04a2b45c9 | |
parent | 95872e15f2e71efd2e8dd7e5adca942309401a99 (diff) | |
download | arr-630132a6435f55963747d4f1f2e26b80eb795484.tar.gz arr-630132a6435f55963747d4f1f2e26b80eb795484.tar.xz arr-630132a6435f55963747d4f1f2e26b80eb795484.zip |
Check for proper "?" syntax
-rw-r--r-- | arr.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/arr.c b/arr.c index 380a144..2644cf3 100644 --- a/arr.c +++ b/arr.c @@ -138,8 +138,12 @@ fmt_inner(char **args) case '"': s++; lastsplit = *s; - // XXX check for second " s++; + if (*s != '"') { + fprintf(stderr, "invalid syntax '\"%c%s'\n", + lastsplit, s); + exit(1); + } s++; goto split2; default: { /* split at char, recurse */ |