diff options
Diffstat (limited to 'mdoc_argv.c')
-rw-r--r-- | mdoc_argv.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/mdoc_argv.c b/mdoc_argv.c index 41d7300b..ea6f8fc4 100644 --- a/mdoc_argv.c +++ b/mdoc_argv.c @@ -402,9 +402,10 @@ args(struct mdoc *m, int line, int *pos, return(ARGS_EOLN); /* - * If the first character is a delimiter and we're to look for - * delimited strings, then pass down the buffer seeing if it - * follows the pattern of [[::delim::][ ]+]+. + * If the first character is a closing delimiter and we're to + * look for delimited strings, then pass down the buffer seeing + * if it follows the pattern of [[::delim::][ ]+]+. Note that + * we ONLY care about closing delimiters. */ if ((fl & ARGS_DELIM) && mdoc_iscdelim(buf[*pos]) > 1) { @@ -412,14 +413,14 @@ args(struct mdoc *m, int line, int *pos, if ( mdoc_iscdelim(buf[i]) < 2) break; i++; - if (0 == buf[i] || ' ' != buf[i]) + if ('\0' == buf[i] || ' ' != buf[i]) break; i++; while (buf[i] && ' ' == buf[i]) i++; } - if (0 == buf[i]) { + if ('\0' == buf[i]) { *v = &buf[*pos]; if (' ' != buf[i - 1]) return(ARGS_PUNCT); |