From ca00a3c56f21bcf2b86b3afd6aae2ce699736a63 Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Sat, 28 Feb 2009 12:16:02 +0000 Subject: Fixed delimiter end-of-line parsing. --- argv.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'argv.c') 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 * @@ -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++; } -- cgit v1.2.3-56-ge451