diff --git a/libvncserver/cursor.c b/libvncserver/cursor.c index 06c9ef2..b9e8096 100644 --- a/libvncserver/cursor.c +++ b/libvncserver/cursor.c @@ -377,7 +377,7 @@ void rfbMakeRichCursorFromXCursor(rfbScreenInfoPtr rfbScreen,rfbCursorPtr cursor cursor->foreGreen<greenShift|cursor->foreBlue<blueShift; for(j=0;jheight;j++) - for(i=0,bit=0x80;iheight;i++,bit=(bit&1)?0x80:bit>>1,cp+=bpp) + for(i=0,bit=0x80;iwidth;i++,bit=(bit&1)?0x80:bit>>1,cp+=bpp) if(cursor->source[j*w+i/8]&bit) memcpy(cp,fore,bpp); else memcpy(cp,back,bpp); }