summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/client/cl_parse.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/client/cl_parse.c b/src/client/cl_parse.c
index 7a75239e..1b0e2802 100644
--- a/src/client/cl_parse.c
+++ b/src/client/cl_parse.c
@@ -557,7 +557,7 @@ A download message has been received from the server
void CL_ParseDownload ( msg_t *msg ) {
int size;
unsigned char data[MAX_MSGLEN];
- int block;
+ uint16_t block;
if (!*clc.downloadTempName) {
Com_Printf("Server sending download, but no download was requested\n");
@@ -568,7 +568,7 @@ void CL_ParseDownload ( msg_t *msg ) {
// read the data
block = MSG_ReadShort ( msg );
- if ( !block )
+ if(!block && !clc.downloadBlock)
{
// block zero is special, contains file size
clc.downloadSize = MSG_ReadLong ( msg );
@@ -591,8 +591,9 @@ void CL_ParseDownload ( msg_t *msg ) {
MSG_ReadData(msg, data, size);
- if (clc.downloadBlock != block) {
- Com_DPrintf( "CL_ParseDownload: Expected block %d, got %d\n", clc.downloadBlock, block);
+ if((clc.downloadBlock & 0xFFFF) != block)
+ {
+ Com_DPrintf( "CL_ParseDownload: Expected block %d, got %d\n", (clc.downloadBlock & 0xFFFF), block);
return;
}