diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-07-27 14:58:28 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-07-27 14:58:28 +0000 |
commit | 352d15302e33e6a449c94e758aae49ad40418f79 (patch) | |
tree | 5806224bc8afe2e4ccf02ffb51b8b4f23812ab8b | |
parent | c3c33eacd06ddcf85dffc610f67f49e7f0e633fd (diff) | |
download | mandoc-352d15302e33e6a449c94e758aae49ad40418f79.tar.gz mandoc-352d15302e33e6a449c94e758aae49ad40418f79.tar.zst mandoc-352d15302e33e6a449c94e758aae49ad40418f79.zip |
Fix a memory-offset bug that was hell tracking down.
-rw-r--r-- | roff.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,4 +1,4 @@ -/* $Id: roff.c,v 1.160 2011/07/27 14:23:27 kristaps Exp $ */ +/* $Id: roff.c,v 1.161 2011/07/27 14:58:28 kristaps Exp $ */ /* * Copyright (c) 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010, 2011 Ingo Schwarze <schwarze@openbsd.org> @@ -496,7 +496,7 @@ again: /* Replace the escape sequence by the string. */ - pos += (stesc - *bufp); + pos = stesc - *bufp; nsz = *szp + strlen(res) + 1; n = mandoc_malloc(nsz); |