]> git.cameronkatri.com Git - mandoc.git/commitdiff
Fixed delimiter end-of-line parsing.
authorKristaps Dzonsons <kristaps@bsd.lv>
Sat, 28 Feb 2009 12:16:02 +0000 (12:16 +0000)
committerKristaps Dzonsons <kristaps@bsd.lv>
Sat, 28 Feb 2009 12:16:02 +0000 (12:16 +0000)
argv.c

diff --git a/argv.c b/argv.c
index a49c5146afbe07ecccdeae4c4ea569ffb9cdd761..8ad5d662ff223b4d3e4b395cbfdcd3be45bec86c 100644 (file)
--- a/argv.c
+++ b/argv.c
@@ -1,4 +1,4 @@
-/* $Id: argv.c,v 1.33 2009/02/27 09:39:40 kristaps Exp $ */
+/* $Id: argv.c,v 1.34 2009/02/28 12:16:02 kristaps Exp $ */
 /*
  * Copyright (c) 2008 Kristaps Dzonsons <kristaps@kth.se>
  *
@@ -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++;
                }