summaryrefslogtreecommitdiffstats
path: root/krfb/libvncserver/cursor.c
diff options
context:
space:
mode:
Diffstat (limited to 'krfb/libvncserver/cursor.c')
-rw-r--r--krfb/libvncserver/cursor.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/krfb/libvncserver/cursor.c b/krfb/libvncserver/cursor.c
index a27a2fef..3609b18f 100644
--- a/krfb/libvncserver/cursor.c
+++ b/krfb/libvncserver/cursor.c
@@ -362,15 +362,15 @@ rfbCursorPtr rfbMakeXCursor(int width,int height,char* cursorString,char* maskSt
cursor->source = (unsigned char*)calloc(w,height);
for(j=0,cp=cursorString;j<height;j++)
for(i=0,bit=0x80;i<width;i++,bit=(bit&1)?0x80:bit>>1,cp++)
- if(*cp!=' ') cursor->source[j*w+i/8]|=bit;
+ if(*cp!=' ') ((char*)(cursor->source))[j*w+i/8]|=bit;
if(maskString) {
cursor->mask = (unsigned char*)calloc(w,height);
for(j=0,cp=maskString;j<height;j++)
for(i=0,bit=0x80;i<width;i++,bit=(bit&1)?0x80:bit>>1,cp++)
- if(*cp!=' ') cursor->mask[j*w+i/8]|=bit;
+ if(*cp!=' ') ((char*)(cursor->mask))[j*w+i/8]|=bit;
} else
- cursor->mask = (unsigned char*)rfbMakeMaskForXCursor(width,height,cursor->source);
+ cursor->mask = (unsigned char*)rfbMakeMaskForXCursor(width,height,(char*)(cursor->source));
return(cursor);
}
@@ -403,8 +403,8 @@ void rfbFreeCursor(rfbCursorPtr cursor)
if(cursor) {
if(cursor->richSource)
free(cursor->richSource);
- free(cursor->source);
- free(cursor->mask);
+ free((char*)(cursor->source));
+ free((char*)(cursor->mask));
free(cursor);
}
@@ -431,7 +431,7 @@ void MakeXCursorFromRichCursor(rfbScreenInfoPtr rfbScreen,rfbCursorPtr cursor)
for(j=0;j<cursor->height;j++)
for(i=0,bit=0x80;i<cursor->width;i++,bit=(bit&1)?0x80:bit>>1)
if(memcmp(cursor->richSource+j*width+i*bpp,back,bpp))
- cursor->source[j*w+i/8]|=bit;
+ ((char*)(cursor->source))[j*w+i/8]|=bit;
}
void MakeRichCursorFromXCursor(rfbScreenInfoPtr rfbScreen,rfbCursorPtr cursor)