From 352d15302e33e6a449c94e758aae49ad40418f79 Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Wed, 27 Jul 2011 14:58:28 +0000 Subject: Fix a memory-offset bug that was hell tracking down. --- roff.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roff.c b/roff.c index e8c00ea0..bfe388fa 100644 --- a/roff.c +++ b/roff.c @@ -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 * Copyright (c) 2010, 2011 Ingo Schwarze @@ -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); -- cgit v1.2.3-56-ge451