Fix off-by-one error for using '?' as map name
This commit is contained in:
1 parent
25a5ac2a2d
commit
2aa6f1b8f5
1 file changed
+1
-1
+1
-1
@@ -4208,7 +4208,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