summaryrefslogtreecommitdiffstats
path: root/roff.c
diff options
context:
space:
mode:
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 d79cf1da..9dfdf7fb 100644
--- a/roff.c
+++ b/roff.c
@@ -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;