- fix printing of Host_NetError message

- fix downloading of files >65535 in size
This commit is contained in:
Adam Olsen 2001-12-06 08:51:17 +00:00
parent 8fd46ab578
commit 24529530f3
2 changed files with 5 additions and 5 deletions

View file

@ -1377,6 +1377,7 @@ Host_NetError (const char *message, ...)
{
va_list argptr;
int old = 0;
char buf[1024];
old = net_packetlog->int_val;
if (net_packetlog->int_val)
@ -1387,11 +1388,12 @@ Host_NetError (const char *message, ...)
Cvar_SetValue (net_packetlog, old);
va_start (argptr, message);
Host_EndGame (message, argptr);
vsnprintf (buf, sizeof (buf), message, argptr);
va_end (argptr);
Host_EndGame ("%s", buf);
Con_Printf ("%s", "Please report this to "
"quake-devel@lists.sourceforge.net, including the "
"packet log printed out above\n");
va_end (argptr);
}
/*

View file

@ -568,9 +568,7 @@ SV_NextDownload_f (void)
if (!host_client->download)
return;
block.size = host_client->downloadsize - host_client->downloadcount;
if (block.size > 768)
block.size = 768;
block.size = min (host_client->downloadsize - host_client->downloadcount, 768);
block.size = Qread (host_client->download, buffer, block.size);
host_client->downloadcount += block.size;