about summary refs log tree commit diff
path: root/editor/pamenlarge.c
diff options
context:
space:
mode:
Diffstat (limited to 'editor/pamenlarge.c')
-rw-r--r--editor/pamenlarge.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/editor/pamenlarge.c b/editor/pamenlarge.c
index dd61f2cf..187bfb6e 100644
--- a/editor/pamenlarge.c
+++ b/editor/pamenlarge.c
@@ -312,11 +312,8 @@ enlargePbm(struct pam * const inpamP,
         pbm_readpbmrow_packed(inpamP->file, inrow, inpamP->width,
                               inpamP->format);
 
-        if (outcols % 8 > 0) {
-            /* clean final partial byte */ 
-            inrow[inColChars-1] >>= 8 - inpamP->width % 8;
-            inrow[inColChars-1] <<= 8 - inpamP->width % 8;
-        }
+        if (outcols % 8 > 0)           /* clean final partial byte */ 
+            pbm_cleanrowend_packed(inrow, inpamP->width);
 
         enlargePbmRowHorizontally(inpamP, inrow, inColChars, outColChars,
                                   scaleFactor, outrow);