aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/roff.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2011-07-27 13:47:26 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2011-07-27 13:47:26 +0000
commit0b9dc937bd863641e56bc9a00c51a9ddca1194c9 (patch)
tree8df800c7c4291001032a274d90d7618d19af2162 /roff.c
parent782e6e25eb7a311e35db1e16b59998bfc3033a8d (diff)
downloadmandoc-0b9dc937bd863641e56bc9a00c51a9ddca1194c9.tar.gz
mandoc-0b9dc937bd863641e56bc9a00c51a9ddca1194c9.tar.zst
mandoc-0b9dc937bd863641e56bc9a00c51a9ddca1194c9.zip
Critical fix to avoid looping forever.
Diffstat (limited to 'roff.c')
-rw-r--r--roff.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/roff.c b/roff.c
index 68b5a423..4a0140d5 100644
--- a/roff.c
+++ b/roff.c
@@ -1,4 +1,4 @@
-/* $Id: roff.c,v 1.157 2011/07/27 13:42:27 kristaps Exp $ */
+/* $Id: roff.c,v 1.158 2011/07/27 13:47:26 kristaps Exp $ */
/*
* Copyright (c) 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010, 2011 Ingo Schwarze <schwarze@openbsd.org>
@@ -538,8 +538,10 @@ roff_parsetext(char *p)
if (ESCAPE_ERROR == esc)
break;
continue;
- } else if ('-' != *p || p == start)
+ } else if ('-' != *p || p == start) {
+ p++;
continue;
+ }
l = *(p - 1);
r = *(p + 1);