diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2014-07-01 00:32:29 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2014-07-01 00:32:29 +0000 |
commit | 9e7d8bcb8352801ba998920b086e93c8dcad70b3 (patch) | |
tree | 52aa64b17c8af781357bbcd635108d73393daea9 /roff.c | |
parent | f270c16631ea1a3d92c80a5de2a3b9a3946d6578 (diff) | |
download | mandoc-9e7d8bcb8352801ba998920b086e93c8dcad70b3.tar.gz |
The previous commit to this file broke the control flow keywords \{ and \}
when they immediately follow a request or macro name, without intervening
whitespace. Minimal fix.
The lesson learnt here is that, despite their appearance, \{ and \} are
not escape sequences, so never skip them when parsing for names.
Diffstat (limited to 'roff.c')
-rw-r--r-- | roff.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -2018,10 +2018,12 @@ roff_getname(struct roff *r, char **cpp, int ln, int pos) } if ('\\' != *cp) continue; + namesz = cp - name; + if ('{' == cp[1] || '}' == cp[1]) + break; cp++; if ('\\' == *cp) continue; - namesz = cp - name - 1; mandoc_msg(MANDOCERR_NAMESC, r->parse, ln, pos, NULL); mandoc_escape((const char **)&cp, NULL, NULL); break; |