about summary refs log tree commit diff
path: root/converter/pbm/mrftopbm.c
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2009-01-15 21:35:47 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2009-01-15 21:35:47 +0000
commit3976c04edc6d4bdb583875176e06f93fc23d869f (patch)
tree2d428ebedef97f1548fe2d2252604562e7fed2ea /converter/pbm/mrftopbm.c
parent86e28372bb9b28a8d62c33c874f395bbbcd395cf (diff)
downloadnetpbm-mirror-3976c04edc6d4bdb583875176e06f93fc23d869f.tar.gz
netpbm-mirror-3976c04edc6d4bdb583875176e06f93fc23d869f.tar.xz
netpbm-mirror-3976c04edc6d4bdb583875176e06f93fc23d869f.zip
Release 10.35.58
git-svn-id: http://svn.code.sf.net/p/netpbm/code/stable@816 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'converter/pbm/mrftopbm.c')
-rw-r--r--converter/pbm/mrftopbm.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/converter/pbm/mrftopbm.c b/converter/pbm/mrftopbm.c
index 696fe839..9534f3a5 100644
--- a/converter/pbm/mrftopbm.c
+++ b/converter/pbm/mrftopbm.c
@@ -62,10 +62,13 @@ doSquare(FILE *          const in,
         }
     } else {
         /* not all one color, so recurse. */
-        doSquare(in, image, ox,      oy,     w, size >> 1);
-        doSquare(in, image, ox+size, oy,     w, size >> 1);
-        doSquare(in, image, ox,      oy+size,w, size >> 1);
-        doSquare(in, image, ox+size, oy+size,w, size >> 1);
+
+        int halfsize = size >> 1;
+
+        doSquare(in, image, ox,          oy,          w, halfsize);
+        doSquare(in, image, ox+halfsize, oy,          w, halfsize);
+        doSquare(in, image, ox,          oy+halfsize, w, halfsize);
+        doSquare(in, image, ox+halfsize, oy+halfsize, w, halfsize);
     }
 }