summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-02-28 12:16:02 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-02-28 12:16:02 +0000
commitceb708e5f88381f1962dbd83b591b6cc35b9549e (patch)
tree64f1d08881c9cdece63c56c2d5a8e0f2b2dba8da
parent5bf40bcc5b0e4d1d51d2b6aa8f1e6945297b00d2 (diff)
downloadmandoc-ceb708e5f88381f1962dbd83b591b6cc35b9549e.tar.gz
Fixed delimiter end-of-line parsing.
-rw-r--r--argv.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/argv.c b/argv.c
index 01dba107..77864950 100644
--- a/argv.c
+++ b/argv.c
@@ -294,6 +294,10 @@ args(struct mdoc *mdoc, int line,
if ( ! mdoc_iscdelim(buf[i]))
break;
i++;
+ /* There must be at least one space... */
+ if (0 == buf[i] || ! isspace((int)buf[i]))
+ break;
+ i++;
while (buf[i] && isspace((int)buf[i]))
i++;
}