Fix depth sanity test in PixelFormat

This commit is contained in:
Pierre Ossman 2019-09-10 16:01:44 +02:00 committed by Lauri Kasanen
parent 1224cbdc21
commit 9f7abaea3a

View File

@ -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)