ref: 0a88581c12e2d029bb42aa7d2c745645a3a5d6fe
parent: 02da65fafcef22d50df76638362b946d6a2ec96b
author: giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
date: Mon Dec 1 14:46:01 EST 2003
Split an expression into two pieces to avoid confusion over order of operations. git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@295 ded80894-8fb9-0310-811b-c03f3676ab4d
--- a/jbig2_image.c
+++ b/jbig2_image.c
@@ -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);