Fix off-by-one error for using '?' as map name
This commit is contained in:
1 parent
0c8516d33a
commit
5279192102
1 file changed
+1
-1
+1
-1
@@ -4206,7 +4206,7 @@ INT32 G_FindMapByNameOrCode(const char *mapname, char **realmapnamep)
|
||||
if (mapname[0] == '*') // current map
|
||||
return gamemap;
|
||||
else if (mapname[0] == '?' && mapheaderinfo[gamemap-1])
|
||||
return G_RandMap(G_TOLFlag(gametype), gamemap-1, false, 0, false, NULL);
|
||||
return G_RandMap(G_TOLFlag(gametype), gamemap-1, false, 0, false, NULL)+1;
|
||||
else if (mapname[0] == '+' && mapheaderinfo[gamemap-1]) // next map
|
||||
{
|
||||
newmapnum = mapheaderinfo[gamemap-1]->nextlevel;
|
||||
|
||||
Reference in new issue
Block a user