rnd-20030803-3-src
[rocksndiamonds.git] / src / libgame / pcx.c
index c7b308b0900a4d56644f73823e7248c173131fb3..47a11d462fec86888cdb14b7cd7e39c99a3708ab 100644 (file)
@@ -167,12 +167,11 @@ static boolean PCX_ReadBitmap(FILE *file, struct PCX_Header *pcx, Image *image)
 
          for (j = 7; j >= 0; j--)
          {
-           byte bit;
+           byte bit = (value >> j) & 1;
 
            if (i * 8 + j >= width)     /* skip padding bits */
              continue;
 
-           bit = (value >> j) & 1;
            bitmap_ptr[x++] |= bit << plane;
          }
        }