aboutsummaryrefslogtreecommitdiffstatshomepage
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
commitd9778532d7fc46ee0ace241131012276d6e28cf2 (patch)
tree5e978e295fc704523aa403da8489648184f11503 /main.c
parent7cbe6317b2a1736649bd6feceecdc891b7fce6fc (diff)
downloadmandoc-d9778532d7fc46ee0ace241131012276d6e28cf2.tar.gz
mandoc-d9778532d7fc46ee0ace241131012276d6e28cf2.tar.zst
mandoc-d9778532d7fc46ee0ace241131012276d6e28cf2.zip
Fix for Joerg's patch stripping of pre-comment whitespace (by Joerg).
Diffstat (limited to 'main.c')
-rw-r--r--main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/main.c b/main.c
index 9eee9aea..94c635f8 100644
--- a/main.c
+++ b/main.c
@@ -1,4 +1,4 @@
-/* $Id: main.c,v 1.62 2010/05/09 21:19:42 kristaps Exp $ */
+/* $Id: main.c,v 1.63 2010/05/14 13:54:15 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -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;