diff -u directvnc-0.7.5/src/rfb.c directvnc-0.7.5.new/src/rfb.c --- directvnc-0.7.5/src/rfb.c 2003-01-31 09:41:03.000000000 +0100 +++ directvnc-0.7.5.new/src/rfb.c 2008-07-07 13:12:18.000000000 +0200 @@ -248,6 +248,8 @@ if (!write_exact(sock, (char*)&pf, sz_rfbSetPixelFormatMsg)) return 0; em.type = rfbSetEncodings; + em.nEncodings = 0; + /* figure out the encodings string given on the command line */ next = strtok(opt.encodings, " "); while (next && em.nEncodings < MAX_ENCODINGS)