From 1b939f3fc9a59c4dd5ac04a9c995a8457d4ee32a Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Wed, 21 Jul 2010 20:35:03 +0000 Subject: Accomodate for groff's crappy behaviour wherein an unrecognised single-character escape (and ONLY this type of escape) will map back into itself: "If a backslash is followed by a character that does not constitute a defined escape sequence the backslash is silently ignored and the character maps to itself." (From groff.7.) Found by Jason McIntyre. --- mandoc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mandoc.c') diff --git a/mandoc.c b/mandoc.c index c001b637..69972c04 100644 --- a/mandoc.c +++ b/mandoc.c @@ -1,4 +1,4 @@ -/* $Id: mandoc.c,v 1.24 2010/07/18 22:55:06 kristaps Exp $ */ +/* $Id: mandoc.c,v 1.25 2010/07/21 20:35:03 kristaps Exp $ */ /* * Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons * @@ -314,7 +314,7 @@ mandoc_eos(const char *p, size_t sz, int enclosed) */ found = 0; - for (q = p + sz - 1; q >= p; q--) { + for (q = p + (int)sz - 1; q >= p; q--) { switch (*q) { case ('\"'): /* FALLTHROUGH */ -- cgit v1.2.3