Fix some && (logical) that should clearly have been & (bitwise).
authorAdam Jackson <ajax@freedesktop.org>
Thu, 9 Nov 2006 20:47:22 +0000 (20:47 +0000)
committerAdam Jackson <ajax@freedesktop.org>
Thu, 9 Nov 2006 20:47:22 +0000 (20:47 +0000)
src/mesa/drivers/x11/xm_span.c

index ff0557800ae3e0d13f0380a2ba2f538f5939650a..a24966b3aeb41ec5f4d645f349855b2ccfaad751 100644 (file)
@@ -1453,7 +1453,7 @@ static void put_row_8R8G8B24_ximage( PUT_ROW_ARGS )
                   pixel &= 0x00ffffff;
                   pixel |= rgba[i][BCOMP] << 24;
                   *ptr4++ = pixel;
-                  pixel = *ptr4 && 0xffff0000;
+                  pixel = *ptr4 & 0xffff0000;
                   pixel |= rgba[i][GCOMP];
                   pixel |= rgba[i][RCOMP] << 8;
                   *ptr4 = pixel;
@@ -1463,7 +1463,7 @@ static void put_row_8R8G8B24_ximage( PUT_ROW_ARGS )
                   pixel |= rgba[i][BCOMP] << 16;
                   pixel |= rgba[i][GCOMP] << 24;
                   *ptr4++ = pixel;
-                  pixel = *ptr4 && 0xffffff00;
+                  pixel = *ptr4 & 0xffffff00;
                   pixel |= rgba[i][RCOMP];
                   *ptr4 = pixel;
                   break;
@@ -1493,7 +1493,7 @@ static void put_row_8R8G8B24_ximage( PUT_ROW_ARGS )
             pixel &= 0x00ffffff;
             pixel |= rgba[i][BCOMP] << 24;
             *ptr4++ = pixel;
-            pixel = *ptr4 && 0xffff0000;
+            pixel = *ptr4 & 0xffff0000;
             pixel |= rgba[i][GCOMP];
             pixel |= rgba[i++][RCOMP] << 8;
             *ptr4 = pixel;
@@ -1504,7 +1504,7 @@ static void put_row_8R8G8B24_ximage( PUT_ROW_ARGS )
             pixel |= rgba[i][BCOMP] << 16;
             pixel |= rgba[i][GCOMP] << 24;
             *ptr4++ = pixel;
-            pixel = *ptr4 && 0xffffff00;
+            pixel = *ptr4 & 0xffffff00;
             pixel |= rgba[i++][RCOMP];
             *ptr4 = pixel;
             if (0 == --w)