diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2010-05-15 15:58:57 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2010-05-15 15:58:57 +0000 |
commit | 33e6dc56151b70e65d24adda8a3ca8b09bc7518b (patch) | |
tree | 620b1e033f345866c8988980fb7251263394e287 /usr.bin/mandoc | |
parent | 4b2df8392568df57c919e597917a8e11d2ff6c98 (diff) |
merge bsd.lv 1.63:
fix stripping of whitespace before trailing comments;
by Joerg Sonnenberger
Diffstat (limited to 'usr.bin/mandoc')
-rw-r--r-- | usr.bin/mandoc/main.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/mandoc/main.c b/usr.bin/mandoc/main.c index a9f0e5b5dcb..1d8a79c58bd 100644 --- a/usr.bin/mandoc/main.c +++ b/usr.bin/mandoc/main.c @@ -1,4 +1,4 @@ -/* $Id: main.c,v 1.25 2010/05/14 01:54:37 schwarze Exp $ */ +/* $Id: main.c,v 1.26 2010/05/15 15:58:56 schwarze Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se> * @@ -363,9 +363,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; |