diff options
author | Pierre Ossman <ossman@cendio.se> | 2024-08-30 16:15:09 +0200 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2024-08-30 16:15:09 +0200 |
commit | 6d9017eeb364491cf2acdf1c7e61aee8dd198527 (patch) | |
tree | 225af30e2404e897a93cfd61d9a5d690aba6db22 | |
parent | 49a087e8f8ecafe950a86a71ae6657d6cac8ea77 (diff) | |
download | tigervnc-6d9017eeb364491cf2acdf1c7e61aee8dd198527.tar.gz tigervnc-6d9017eeb364491cf2acdf1c7e61aee8dd198527.zip |
Correctly handle ZRLE cursors
Cursor data has a depth of 32 bits and hence cannot use CPIXELs.
This is a regression from baca73d.
-rw-r--r-- | common/rfb/ZRLEDecoder.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/common/rfb/ZRLEDecoder.cxx b/common/rfb/ZRLEDecoder.cxx index 474fd6ca..e274a697 100644 --- a/common/rfb/ZRLEDecoder.cxx +++ b/common/rfb/ZRLEDecoder.cxx @@ -125,10 +125,10 @@ void ZRLEDecoder::zrleDecode(const Rect& r, rdr::InStream* is, Pixel maxPixel = pf.pixelFromRGB((uint16_t)-1, (uint16_t)-1, (uint16_t)-1); bool fitsInLS3Bytes = maxPixel < (1<<24); bool fitsInMS3Bytes = (maxPixel & 0xff) == 0; - bool isLowCPixel = (sizeof(T) == 4) && + bool isLowCPixel = (sizeof(T) == 4) && (pf.depth <= 24) && ((fitsInLS3Bytes && pf.isLittleEndian()) || (fitsInMS3Bytes && pf.isBigEndian())); - bool isHighCPixel = (sizeof(T) == 4) && + bool isHighCPixel = (sizeof(T) == 4) && (pf.depth <= 24) && ((fitsInLS3Bytes && pf.isBigEndian()) || (fitsInMS3Bytes && pf.isLittleEndian())); |