diff options
-rw-r--r-- | mdoc_validate.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mdoc_validate.c b/mdoc_validate.c index 489c5adf..54342b98 100644 --- a/mdoc_validate.c +++ b/mdoc_validate.c @@ -412,8 +412,9 @@ check_text_em(struct roff_man *mdoc, int ln, int pos, char *p) /* Look for em-dashes wrongly encoded as "--". */ for (cp = p; *cp != '\0'; cp++) { - if (*cp != '-' || *++cp != '-') + if (cp[0] != '-' || cp[1] != '-') continue; + cp++; /* Skip input sequences of more than two '-'. */ |