diff --git a/common/rfb/PixelFormat.cxx b/common/rfb/PixelFormat.cxx index 883b041..552491d 100644 --- a/common/rfb/PixelFormat.cxx +++ b/common/rfb/PixelFormat.cxx @@ -678,7 +678,7 @@ bool PixelFormat::isSane(void) return false; totalBits = bits(redMax) + bits(greenMax) + bits(blueMax); - if (totalBits > bpp) + if (totalBits > depth) return false; if (((redMax << redShift) & (greenMax << greenShift)) != 0)