diff options
author | Christian Beier <dontmind@freeshell.org> | 2018-11-19 21:29:03 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-19 21:29:03 +0100 |
commit | 1452b9a6ae082382215a8d0ddcdbb38df38d9aeb (patch) | |
tree | 3feb372ba167adc79b062eda4c5a4b5b438ea9cc | |
parent | 2c61a095c6fd9e1654bf41dd96b74223815df83f (diff) | |
parent | c422847e2c5f32ed9531c461650c7f627516d951 (diff) | |
download | libtdevnc-1452b9a6ae082382215a8d0ddcdbb38df38d9aeb.tar.gz libtdevnc-1452b9a6ae082382215a8d0ddcdbb38df38d9aeb.zip |
Merge pull request #259 from veyon/cursor-shift
LibVNCClient: fix integer shifts for cursor colors
-rw-r--r-- | libvncserver/cursor.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libvncserver/cursor.c b/libvncserver/cursor.c index c071dd9..8779470 100644 --- a/libvncserver/cursor.c +++ b/libvncserver/cursor.c @@ -456,10 +456,10 @@ void rfbMakeRichCursorFromXCursor(rfbScreenInfoPtr rfbScreen,rfbCursorPtr cursor fore+=4-bpp; } - background=cursor->backRed<<format->redShift| - cursor->backGreen<<format->greenShift|cursor->backBlue<<format->blueShift; - foreground=cursor->foreRed<<format->redShift| - cursor->foreGreen<<format->greenShift|cursor->foreBlue<<format->blueShift; + background=(uint32_t)cursor->backRed<<format->redShift| + (uint32_t)cursor->backGreen<<format->greenShift|(uint32_t)cursor->backBlue<<format->blueShift; + foreground=(uint32_t)cursor->foreRed<<format->redShift| + (uint32_t)cursor->foreGreen<<format->greenShift|(uint32_t)cursor->foreBlue<<format->blueShift; for(j=0;j<cursor->height;j++) for(i=0,bit=0x80;i<cursor->width;i++,bit=(bit&1)?0x80:bit>>1,cp+=bpp) |