mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-25 14:00:58 +00:00
Fix an off-by-one in memmove() call in SV_Map()
Submitted by: Ozkan Sezer
This commit is contained in:
parent
c0fac70763
commit
bd025ae5c5
1 changed files with 5 additions and 4 deletions
|
@ -377,7 +377,7 @@ SV_InitGame(void)
|
|||
svs.spawncount = randk();
|
||||
svs.clients = Z_Malloc(sizeof(client_t) * maxclients->value);
|
||||
svs.num_client_entities = maxclients->value * UPDATE_BACKUP * 64;
|
||||
svs.client_entities =
|
||||
svs.client_entities =
|
||||
Z_Malloc( sizeof(entity_state_t) * svs.num_client_entities);
|
||||
|
||||
/* init network stuff */
|
||||
|
@ -463,13 +463,14 @@ SV_Map(qboolean attractloop, char *levelstring, qboolean loadgame)
|
|||
}
|
||||
|
||||
/* skip the end-of-unit flag if necessary */
|
||||
l = strlen(level);
|
||||
|
||||
if (level[0] == '*')
|
||||
{
|
||||
memmove(level, level + 1, strlen(level) + 1);
|
||||
memmove(level, level + 1, l);
|
||||
--l;
|
||||
}
|
||||
|
||||
l = strlen(level);
|
||||
|
||||
if ((l > 4) && !strcmp(level + l - 4, ".cin"))
|
||||
{
|
||||
#ifndef DEDICATED_ONLY
|
||||
|
|
Loading…
Reference in a new issue