summaryrefslogtreecommitdiffstats
path: root/roff.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2018-12-20 03:41:54 +0000
committerIngo Schwarze <schwarze@openbsd.org>2018-12-20 03:41:54 +0000
commit7555290d19eb4ba2c9ccec884db5c224fa97c98d (patch)
treee6137ca85a08e33775890cdde92d742eb60701e0 /roff.c
parent159280a707df1cb0a5c66c576c8a92527e2b6d03 (diff)
downloadmandoc-7555290d19eb4ba2c9ccec884db5c224fa97c98d.tar.gz
Bugfix:
When after a \\, \t, or \a, another \t or \a had to be resolved in copy mode within the same argument, the argument got corrupted. Found while working on a loosely related bug report from Fabio Scotoni <fabio at esse dot ch>.
Diffstat (limited to 'roff.c')
-rw-r--r--roff.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/roff.c b/roff.c
index be4a0a1c..2d83f452 100644
--- a/roff.c
+++ b/roff.c
@@ -1588,7 +1588,7 @@ mandoc_getarg(char **cpp, int ln, int *pos)
switch (cp[1]) {
case 'a':
case 't':
- cp[0] = '\t';
+ cp[-pairs] = '\t';
/* FALLTHROUGH */
case '\\':
pairs++;