Merge pull request #259 from veyon/cursor-shift

LibVNCClient: fix integer shifts for cursor colors
pull/3/head
Christian Beier 6 years ago committed by GitHub
commit 1452b9a6ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -456,10 +456,10 @@ void rfbMakeRichCursorFromXCursor(rfbScreenInfoPtr rfbScreen,rfbCursorPtr cursor
fore+=4-bpp; fore+=4-bpp;
} }
background=cursor->backRed<<format->redShift| background=(uint32_t)cursor->backRed<<format->redShift|
cursor->backGreen<<format->greenShift|cursor->backBlue<<format->blueShift; (uint32_t)cursor->backGreen<<format->greenShift|(uint32_t)cursor->backBlue<<format->blueShift;
foreground=cursor->foreRed<<format->redShift| foreground=(uint32_t)cursor->foreRed<<format->redShift|
cursor->foreGreen<<format->greenShift|cursor->foreBlue<<format->blueShift; (uint32_t)cursor->foreGreen<<format->greenShift|(uint32_t)cursor->foreBlue<<format->blueShift;
for(j=0;j<cursor->height;j++) for(j=0;j<cursor->height;j++)
for(i=0,bit=0x80;i<cursor->width;i++,bit=(bit&1)?0x80:bit>>1,cp+=bpp) for(i=0,bit=0x80;i<cursor->width;i++,bit=(bit&1)?0x80:bit>>1,cp+=bpp)

Loading…
Cancel
Save