--- sourceforge.net/trunk/rdesktop/xwin.c 2004/03/03 10:41:53 619 +++ sourceforge.net/trunk/rdesktop/xwin.c 2004/03/03 10:46:35 620 @@ -1922,6 +1922,12 @@ SET_FOREGROUND(bgcolour); + /* Sometimes, the boxcx value is something really large, like + 32691. This makes XCopyArea fail with Xvnc. The code below + is a quick fix. */ + if (boxx + boxcx > g_width) + boxcx = g_width - boxx; + if (boxcx > 1) { FILL_RECTANGLE_BACKSTORE(boxx, boxy, boxcx, boxcy);