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[])
{
int i,i1;
if(!argc) return;
for (i = i1 = 1; i < *argc; i++) {
if (strcmp(argv[i], "-help") == 0) {
rfbUsage();
......@@ -101,6 +103,7 @@ rfbProcessSizeArguments(int* width,int* height,int* bpp,int* argc, char *argv[])
{
int i,i1;
if(!argc) return;
for (i = i1 = 1; i < *argc-1; i++) {
if (strcmp(argv[i], "-bpp") == 0) {
*bpp = atoi(argv[++i]);
......
......@@ -143,6 +143,8 @@ void rfbDoCopyRegion(rfbScreenInfoPtr rfbScreen,sraRegionPtr copyRegion,int dx,i
rowstride=rfbScreen->paddedWidthInBytes;
char *in,*out;
rfbUndrawCursor(rfbScreen);
/* copy it, really */
i = sraRgnGetReverseIterator(copyRegion,dx<0,dy<0);
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