*argc=0 in cargs allowed, when copying area, first undraw cursor ...

pull/1/head
dscho 23 years ago
parent 11651ff293
commit cddeb0d9d2

@ -40,6 +40,8 @@ rfbProcessArguments(rfbScreenInfoPtr rfbScreen,int* argc, char *argv[])
{ {
int i,i1; int i,i1;
if(!argc) return;
for (i = i1 = 1; i < *argc; i++) { for (i = i1 = 1; i < *argc; i++) {
if (strcmp(argv[i], "-help") == 0) { if (strcmp(argv[i], "-help") == 0) {
rfbUsage(); rfbUsage();
@ -101,6 +103,7 @@ rfbProcessSizeArguments(int* width,int* height,int* bpp,int* argc, char *argv[])
{ {
int i,i1; int i,i1;
if(!argc) return;
for (i = i1 = 1; i < *argc-1; i++) { for (i = i1 = 1; i < *argc-1; i++) {
if (strcmp(argv[i], "-bpp") == 0) { if (strcmp(argv[i], "-bpp") == 0) {
*bpp = atoi(argv[++i]); *bpp = atoi(argv[++i]);

@ -143,6 +143,8 @@ void rfbDoCopyRegion(rfbScreenInfoPtr rfbScreen,sraRegionPtr copyRegion,int dx,i
rowstride=rfbScreen->paddedWidthInBytes; rowstride=rfbScreen->paddedWidthInBytes;
char *in,*out; char *in,*out;
rfbUndrawCursor(rfbScreen);
/* copy it, really */ /* copy it, really */
i = sraRgnGetReverseIterator(copyRegion,dx<0,dy<0); i = sraRgnGetReverseIterator(copyRegion,dx<0,dy<0);
while(sraRgnIteratorNext(i,&rect)) { while(sraRgnIteratorNext(i,&rect)) {

Loading…
Cancel
Save