From 4c98151b506dab24c773ccfb5eb5d34f3ede915d Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Wed, 7 Jun 2017 20:30:40 +0000 Subject: Make "new sentence, new line" detection stricter: Also catch cases where the new sentence starts with a one-letter word and the input line is broken right after that word. Suggested by Thomas Klausner . It's merely a three-bit diff, changing one byte from 0x34 to 0x33, so what can possibly go wrong... --- mdoc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mdoc.c b/mdoc.c index 3bdec3db..23a661be 100644 --- a/mdoc.c +++ b/mdoc.c @@ -278,7 +278,7 @@ mdoc_ptext(struct roff_man *mdoc, int line, char *buf, int offs) for (c = buf + offs; c != NULL; c = strchr(c + 1, '.')) { if (c - buf < offs + 2) continue; - if (end - c < 4) + if (end - c < 3) break; if (isalpha((unsigned char)c[-2]) && isalpha((unsigned char)c[-1]) && -- cgit