Revision 2caa9e9d ui/vnc-enc-tight.c

b/ui/vnc-enc-tight.c
868 868
    zstream->avail_in = vs->tight.tight.offset;
869 869
    zstream->next_out = vs->tight.zlib.buffer + vs->tight.zlib.offset;
870 870
    zstream->avail_out = vs->tight.zlib.capacity - vs->tight.zlib.offset;
871
    previous_out = zstream->avail_out;
871 872
    zstream->data_type = Z_BINARY;
872
    previous_out = zstream->total_out;
873 873

  
874 874
    /* start encoding */
875 875
    if (deflate(zstream, Z_SYNC_FLUSH) != Z_OK) {
......
878 878
    }
879 879

  
880 880
    vs->tight.zlib.offset = vs->tight.zlib.capacity - zstream->avail_out;
881
    bytes = zstream->total_out - previous_out;
881
    /* ...how much data has actually been produced by deflate() */
882
    bytes = previous_out - zstream->avail_out;
882 883

  
883 884
    tight_send_compact_size(vs, bytes);
884 885
    vnc_write(vs, vs->tight.zlib.buffer, bytes);

Also available in: Unified diff