about summary refs log tree commit diff
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2015-11-14 16:35:35 +0100
committerChristian Neukirchen <chneukirchen@gmail.com>2015-11-14 16:35:35 +0100
commit630132a6435f55963747d4f1f2e26b80eb795484 (patch)
treef0fbc0f610e09cebc6ccf83ae98500a04a2b45c9
parent95872e15f2e71efd2e8dd7e5adca942309401a99 (diff)
downloadarr-630132a6435f55963747d4f1f2e26b80eb795484.tar.gz
arr-630132a6435f55963747d4f1f2e26b80eb795484.tar.xz
arr-630132a6435f55963747d4f1f2e26b80eb795484.zip
Check for proper "?" syntax
-rw-r--r--arr.c6
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 */