about summary refs log tree commit diff
path: root/converter
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2012-11-18 00:20:17 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2012-11-18 00:20:17 +0000
commit0c19d160d0d0cba6ff7fd5a67e704ead2296c3c4 (patch)
treed51dea2499e86f55a6574ed8b2ebee45730182a4 /converter
parent6210b492da329d6e4b23c00bf948d7e5ad68b849 (diff)
downloadnetpbm-mirror-0c19d160d0d0cba6ff7fd5a67e704ead2296c3c4.tar.gz
netpbm-mirror-0c19d160d0d0cba6ff7fd5a67e704ead2296c3c4.tar.xz
netpbm-mirror-0c19d160d0d0cba6ff7fd5a67e704ead2296c3c4.zip
Release 10.60.03
git-svn-id: http://svn.code.sf.net/p/netpbm/code/advanced@1763 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'converter')
-rw-r--r--converter/pbm/xbmtopbm.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/converter/pbm/xbmtopbm.c b/converter/pbm/xbmtopbm.c
index 2ac61ccf..0cbebc5e 100644
--- a/converter/pbm/xbmtopbm.c
+++ b/converter/pbm/xbmtopbm.c
@@ -364,13 +364,14 @@ main(int    argc,
             bitrow[i] = bitreverse[*p++];
             
         if (cols % 8 > 0) {
-            bitrow[bytesPerRow] >>= 8 - cols % 8;
-            bitrow[bytesPerRow] <<= 8 - cols % 8;
+            bitrow[bytesPerRow-1] >>= 8 - cols % 8;
+            bitrow[bytesPerRow-1] <<= 8 - cols % 8;
         }
             
         pbm_writepbmrow_packed(stdout, bitrow, cols, 0);
     }
 
+    pbm_freerow(bitrow);
     free(data);
     pm_close(stdout);