diff --git a/engine/server/sv_init.c b/engine/server/sv_init.c index 233cf5aa9..14455c9bc 100644 --- a/engine/server/sv_init.c +++ b/engine/server/sv_init.c @@ -326,7 +326,7 @@ void SV_SaveSpawnparms (qboolean dontsave) if (PR_FindGlobal(svprogfuncs, "ClientReEnter", 0, NULL)) {//oooh, evil. char buffer[65536*4]; - int bufsize = sizeof(buffer); + int bufsize = 0; char *buf; for (j=0 ; jspawn_parms[j] = 0; @@ -336,7 +336,7 @@ void SV_SaveSpawnparms (qboolean dontsave) if (host_client->spawninfo) Z_Free(host_client->spawninfo); host_client->spawninfo = Z_Malloc(bufsize+1); - memcpy(host_client->spawninfo, buf, bufsize); + memcpy(host_client->spawninfo, buf, bufsize+1); host_client->spawninfotime = sv.time; }