summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--argv.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/argv.c b/argv.c
index a49c5146..8ad5d662 100644
--- 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++;
}