diff --git a/src/g_level.cpp b/src/g_level.cpp index 19a4d607c..7654e0120 100644 --- a/src/g_level.cpp +++ b/src/g_level.cpp @@ -2224,8 +2224,14 @@ CCMD(listmaps) if (map != NULL) { - Printf("%s: '%s' (%s)\n", info->MapName.GetChars(), info->LookupLevelName().GetChars(), - Wads.GetWadName(Wads.GetLumpFile(map->lumpnum))); + if (argv.argc() == 1 + || CheckWildcards(argv[1], info->MapName.GetChars()) + || CheckWildcards(argv[1], info->LookupLevelName().GetChars()) + || CheckWildcards(argv[1], Wads.GetWadName(Wads.GetLumpFile(map->lumpnum)))) + { + Printf("%s: '%s' (%s)\n", info->MapName.GetChars(), info->LookupLevelName().GetChars(), + Wads.GetWadName(Wads.GetLumpFile(map->lumpnum))); + } delete map; } }