summaryrefslogtreecommitdiffstats
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
commit83b4f157d4daded80000e151a11815be7bc92575 (patch)
treecfdf435a5578191efb49da30ccc56ef93351f543 /mandoc.c
parent28eeb27f1cb4b3c30ede14a1e367fa86624a8420 (diff)
downloadmandoc-83b4f157d4daded80000e151a11815be7bc92575.tar.gz
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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mandoc.c b/mandoc.c
index 83dafb33..fd1423b7 100644
--- a/mandoc.c
+++ b/mandoc.c
@@ -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 */