diff --git a/src/g_game.c b/src/g_game.c
index f819cbd9ae47fcb90be58df5f8e2084ccb077a06..578dc7c6ca37e0d6f225038edb76dc84b69b3f50 100644
--- a/src/g_game.c
+++ b/src/g_game.c
@@ -5387,17 +5387,19 @@ INT32 G_FindMapByNameOrCode(const char *mapname, char **realmapnamep)
 	if (mapnamelen == 1)
 	{
 		if (mapname[0] == '*') // current map
-			return gamemap;
+		{
+			usemapcode = true;
+			newmapnum = gamemap;
+		}
 		else if (mapname[0] == '+' && mapheaderinfo[gamemap-1]) // next map
 		{
+			usemapcode = true;
 			newmapnum = mapheaderinfo[gamemap-1]->nextlevel;
 			if (newmapnum < 1 || newmapnum > NUMMAPS)
 			{
 				CONS_Alert(CONS_ERROR, M_GetText("NextLevel (%d) is not a valid map.\n"), newmapnum);
 				return 0;
 			}
-			else
-				return newmapnum;
 		}
 	}
 	else if (mapnamelen == 2)/* maybe two digit code */