summaryrefslogtreecommitdiffstats
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
commita246292f836147375dc6f624f58cc10c9f0d4f39 (patch)
tree22da63954eb5261ff107079991e5b8cc9bf5e844 /roff.c
parent1554c4f6dffd3847bc9e6f7802c73e00e413efbc (diff)
downloadmandoc-a246292f836147375dc6f624f58cc10c9f0d4f39.tar.gz
Critical fix to avoid looping forever.
Diffstat (limited to 'roff.c')
-rw-r--r--roff.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/roff.c b/roff.c
index 259817d2..d4123375 100644
--- a/roff.c
+++ b/roff.c
@@ -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);