Commit cddeb0d9 authored by dscho's avatar dscho

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

parent 11651ff2
...@@ -40,6 +40,8 @@ rfbProcessArguments(rfbScreenInfoPtr rfbScreen,int* argc, char *argv[]) ...@@ -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[]) ...@@ -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 ...@@ -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)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment