aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/roff.c
diff options
context:
space:
mode:
Diffstat (limited to 'roff.c')
-rw-r--r--roff.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/roff.c b/roff.c
index 1d8a3991..fac9ffa3 100644
--- a/roff.c
+++ b/roff.c
@@ -1,4 +1,4 @@
-/* $Id: roff.c,v 1.227 2014/09/06 22:39:36 schwarze Exp $ */
+/* $Id: roff.c,v 1.228 2014/09/06 23:24:32 schwarze Exp $ */
/*
* Copyright (c) 2010, 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2014 Ingo Schwarze <schwarze@openbsd.org>
@@ -759,6 +759,15 @@ roff_parseln(struct roff *r, int ln, char **bufp,
return(roff_parsetext(bufp, szp, pos, offs));
}
+ /* Skip empty request lines. */
+
+ if ((*bufp)[pos] == '"') {
+ mandoc_msg(MANDOCERR_COMMENT_BAD, r->parse,
+ ln, pos, NULL);
+ return(ROFF_IGN);
+ } else if ((*bufp)[pos] == '\0')
+ return(ROFF_IGN);
+
/*
* If a scope is open, go to the child handler for that macro,
* as it may want to preprocess before doing anything with it.