diff options
| author | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-07-27 13:47:26 +0000 |
|---|---|---|
| committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-07-27 13:47:26 +0000 |
| commit | 0b9dc937bd863641e56bc9a00c51a9ddca1194c9 (patch) | |
| tree | 8df800c7c4291001032a274d90d7618d19af2162 | |
| parent | 782e6e25eb7a311e35db1e16b59998bfc3033a8d (diff) | |
| download | mandoc-0b9dc937bd863641e56bc9a00c51a9ddca1194c9.tar.gz mandoc-0b9dc937bd863641e56bc9a00c51a9ddca1194c9.zip | |
Critical fix to avoid looping forever.
| -rw-r--r-- | roff.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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); |
