From 2a41efa0d43b573e1c8851086268b8a64d51c511 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sat, 31 May 2008 11:43:46 +0000 Subject: fixes zlib compression, infi file parser updates --- src/core/netclient.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/core/netclient.cc') diff --git a/src/core/netclient.cc b/src/core/netclient.cc index 5254b23..310a64c 100644 --- a/src/core/netclient.cc +++ b/src/core/netclient.cc @@ -130,10 +130,10 @@ void NetClient::transmit(int serverfd) return; } - char zbuf[BLOCKSIZE]; + unsigned char zbuf[BLOCKSIZE]; const char *data = 0; - unsigned long compressed_size = BLOCKSIZE - 5; - unsigned long uncompressed_size = sendq.size(); + uLong compressed_size = (uLong) BLOCKSIZE - 5; + uLong uncompressed_size = (uLong) sendq.size(); size_t total_size = 0; memset(zbuf,0, sizeof(zbuf)); @@ -145,8 +145,8 @@ void NetClient::transmit(int serverfd) if ((status == Z_OK) && (compressed_size + 4 < sendq.size())) { // add a header to the compress packet - data = zbuf; - total_size = compressed_size + 4; + data = (char *) zbuf; + total_size = (size_t) (compressed_size + 4); zbuf[0] = '\xff'; zbuf[1] = '\xff'; zbuf[2] = compressed_size % 256; -- cgit v1.2.3