Fix an off-by-one in memmove() call in SV_Map()

Submitted by: Ozkan Sezer
This commit is contained in:
Yamagi Burmeister 2015-08-24 18:02:08 +02:00
parent c0fac70763
commit bd025ae5c5

View file

@ -463,13 +463,14 @@ SV_Map(qboolean attractloop, char *levelstring, qboolean loadgame)
} }
/* skip the end-of-unit flag if necessary */ /* skip the end-of-unit flag if necessary */
l = strlen(level);
if (level[0] == '*') 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")) if ((l > 4) && !strcmp(level + l - 4, ".cin"))
{ {
#ifndef DEDICATED_ONLY #ifndef DEDICATED_ONLY