@ -678,7 +678,7 @@ bool PixelFormat::isSane(void)
return false;
totalBits = bits(redMax) + bits(greenMax) + bits(blueMax);
if (totalBits > bpp)
if (totalBits > depth)
if (((redMax << redShift) & (greenMax << greenShift)) != 0)