summaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-05-14 13:54:15 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-05-14 13:54:15 +0000
commit7309f0de77a908a98032b0508c2d2b426c244099 (patch)
treec83f1b04fdcb97683024892f54ac84bc69876742 /main.c
parent57a976d8a1a1daf04cc62344657b64c304d523bc (diff)
downloadmandoc-7309f0de77a908a98032b0508c2d2b426c244099.tar.gz
Fix for Joerg's patch stripping of pre-comment whitespace (by Joerg).
Diffstat (limited to 'main.c')
-rw-r--r--main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/main.c b/main.c
index 495841b5..a9b90e78 100644
--- a/main.c
+++ b/main.c
@@ -375,9 +375,9 @@ fdesc(struct buf *blk, struct buf *ln, struct curparse *curp)
comment = 1;
pos -= 2;
for (; pos > 0; --pos) {
- if (ln->buf[pos] != ' ')
+ if (ln->buf[pos - 1] != ' ')
break;
- if (ln->buf[pos - 1] == '\\')
+ if (pos > 2 && ln->buf[pos - 2] == '\\')
break;
}
continue;