From fce7452ba630791fa9b3bbd8d6158320b4da305e Mon Sep 17 00:00:00 2001 From: giraffedata Date: Thu, 28 Jul 2022 22:51:17 +0000 Subject: Fix padding in top-bottom concatenation git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@4375 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- editor/pamcat.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'editor/pamcat.c') diff --git a/editor/pamcat.c b/editor/pamcat.c index d9706e29..c6799751 100644 --- a/editor/pamcat.c +++ b/editor/pamcat.c @@ -801,8 +801,10 @@ concatenateLeftRightGen(const struct pam * const outpamP, image 'i', so set its part of outrow[] to padding. */ unsigned int col; - for (col = 0; col < inpamP->width; ++col) - thisEntryP->out[col] = thisEntryP->background; + for (col = 0; col < inpamP->width; ++col) { + pnm_assigntuple(outpamP, thisEntryP->out[col], + thisEntryP->background); + } } if (row == thisEntryP->padtop && thisEntryP->cachedRow) { /* We're at the top row of file 'i', and that row @@ -810,9 +812,10 @@ concatenateLeftRightGen(const struct pam * const outpamP, background. Copy it to image i's part of outrow[]. */ unsigned int col; - for (col = 0; col < inpamP->width; ++col) - thisEntryP->out[col] = thisEntryP->cachedRow[col]; - + for (col = 0; col < inpamP->width; ++col) { + pnm_assigntuple(outpamP, thisEntryP->out[col], + thisEntryP->cachedRow[col]); + } free(thisEntryP->cachedRow); thisEntryP->cachedRow = NULL; } else if (row >= thisEntryP->padtop && -- cgit 1.4.1