aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mandoc.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-07-21 20:35:03 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-07-21 20:35:03 +0000
commit1b939f3fc9a59c4dd5ac04a9c995a8457d4ee32a (patch)
treea3a2b528ee1e0f2ca5ccac1c1261a4a0683a01f3 /mandoc.c
parent52a2d24a5977427830c9757b19fb36e1d1ac5307 (diff)
downloadmandoc-1b939f3fc9a59c4dd5ac04a9c995a8457d4ee32a.tar.gz
mandoc-1b939f3fc9a59c4dd5ac04a9c995a8457d4ee32a.tar.zst
mandoc-1b939f3fc9a59c4dd5ac04a9c995a8457d4ee32a.zip
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.
Diffstat (limited to 'mandoc.c')
-rw-r--r--mandoc.c4
1 files changed, 2 insertions, 2 deletions
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 <kristaps@bsd.lv>
*
@@ -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 */