diff --git a/rpmio/macro.c b/rpmio/macro.c index d460771f8..658bbf624 100644 --- a/rpmio/macro.c +++ b/rpmio/macro.c @@ -1242,7 +1242,7 @@ expandMacro(MacroBuf mb, const char *src) size_t len = strlen(printbuf); if (len > mb->nb) len = mb->nb; - memcpy(mb->buf+tpos, printbuf, len); + memcpy(mb->buf+mb->tpos, printbuf, len); mb->tpos += len; mb->nb -= len; }