rev 295 - trunk

[email protected] Thu, 4 Dec 2003 09:09:44 -0800 (PST)
Newsgroups gmane.comp.printing.ghostscript.jbig2dec.cvs
Message-ID <[email protected]>
Author: giles
Date: 2003-12-01 11:46:01 -0800 (Mon, 01 Dec 2003)
New Revision: 295

Modified:
   trunk/jbig2_image.c
Log:
Split an expression into two pieces to avoid confusion over order of operations.


Modified: trunk/jbig2_image.c
===================================================================
--- trunk/jbig2_image.c	2003-12-01 18:02:00 UTC (rev 294)
+++ trunk/jbig2_image.c	2003-12-01 19:46:01 UTC (rev 295)
@@ -152,8 +152,8 @@
         for (j = 0; j < h; j++) {
 	    *d++ |= (*s & mask) >> shift;
             for(i = leftbyte; i < rightbyte - 1; i++) {
-		*d++ |= ((*s & ~mask) << (8 - shift)) |
-		    ((*(++s) & mask) >> shift);
+		*d |= ((*s++ & ~mask) << (8 - shift));
+		*d++ |= ((*s & mask) >> shift);
 	    }
 	    if (((w + 7) >> 3) < ((x + w + 7) >> 3) - (x >> 3))
 		*d |= (s[0] & rightmask) << (8 - shift);