diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-07-28 14:53:22 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-07-28 14:53:22 +0000 |
commit | 864cc6453721d28cb934896a27bd795158cdf1b4 (patch) | |
tree | a50e11ab637283b7196659cbbb7a2db39ba13340 | |
parent | e193c48a5254c955e330009329e535e00081eb70 (diff) | |
download | mandoc-864cc6453721d28cb934896a27bd795158cdf1b4.tar.gz mandoc-864cc6453721d28cb934896a27bd795158cdf1b4.tar.zst mandoc-864cc6453721d28cb934896a27bd795158cdf1b4.zip |
Fix border condition in `tr' grokking arguments.
-rw-r--r-- | roff.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1,4 +1,4 @@ -/* $Id: roff.c,v 1.164 2011/07/28 14:17:11 kristaps Exp $ */ +/* $Id: roff.c,v 1.165 2011/07/28 14:53:22 kristaps Exp $ */ /* * Copyright (c) 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010, 2011 Ingo Schwarze <schwarze@openbsd.org> @@ -1383,10 +1383,11 @@ roff_tr(ROFF_ARGS) return(ROFF_IGN); } ssz = (size_t)(p - second); - } else if ('\0' == *p) { + } else if ('\0' == *second) { mandoc_msg(MANDOCERR_ARGCOUNT, r->parse, ln, (int)(p - *bufp), NULL); second = " "; + p--; } roff_setstrn(&r->chrtab, first, fsz, second, ssz, 0); |