[vino] Fix iteration of the cursor->source[] array
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [vino] Fix iteration of the cursor->source[] array
- Date: Mon, 14 May 2012 19:05:42 +0000 (UTC)
commit 8bbbfce1785423d6c1af2f3f0588c234e8f96488
Author: Fabrice Bellet <fabrice bellet info>
Date:   Tue May 8 00:50:33 2012 +0100
    Fix iteration of the cursor->source[] array
    
    See bug 492033.
 server/libvncserver/cursor.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/server/libvncserver/cursor.c b/server/libvncserver/cursor.c
index d4bb62e..f509360 100644
--- a/server/libvncserver/cursor.c
+++ b/server/libvncserver/cursor.c
@@ -378,7 +378,7 @@ void MakeRichCursorFromXCursor(rfbScreenInfoPtr rfbScreen,rfbCursorPtr cursor)
      cursor->foreGreen<<format->greenShift|cursor->foreBlue<<format->blueShift;
    
    for(j=0;j<cursor->height;j++)
-     for(i=0,bit=0x80;i<cursor->height;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)
        if(cursor->source[j*w+i/8]&bit) memcpy(cp,fore,bpp);
        else memcpy(cp,back,bpp);
 }
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]