diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2010-07-21 20:35:03 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2010-07-21 20:35:03 +0000 |
commit | 1b939f3fc9a59c4dd5ac04a9c995a8457d4ee32a (patch) | |
tree | a3a2b528ee1e0f2ca5ccac1c1261a4a0683a01f3 /mandoc.c | |
parent | 52a2d24a5977427830c9757b19fb36e1d1ac5307 (diff) | |
download | mandoc-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.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 */ |