From f7fb07006a671d9354f7e1a7b0f0be3e29c120c6 Mon Sep 17 00:00:00 2001 From: Zandr Martin Date: Sat, 06 Jul 2019 09:08:55 -0400 Subject: [PATCH] disallow invalid name characters This commit makes using invalid characters in the name a fatal error. Before this patch, "foo | bar(1)" would parse as "foobar(1)". Now it is a fatal error and parsing stops. --- src/main.c | 2 ++ diff --git a/src/main.c b/src/main.c index 211b932e8c007fed1de27a6c64557ed14099b057..2508a7f0ded51471729b78f7247305adf2f37f3a 100644 --- a/src/main.c +++ b/src/main.c @@ -138,6 +138,8 @@ fprintf(p->output, " %s", ex3); } fprintf(p->output, "\n"); break; + } else { + parser_fatal(p, "Name characters must be A-Z, a-z, 0-9, `-`, `_`, or `.`"); } } str_free(name); -- 2.48.1