We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fb539cf commit aa76fbdCopy full SHA for aa76fbd
src/engine/server/sv_ccmds.cpp
@@ -51,7 +51,7 @@ class MapCmd: public Cmd::StaticCmd {
51
}
52
53
void Run(const Cmd::Args& args) const override {
54
- if (args.Argc() < 2) {
+ if (args.Argc() < 2 || args.Argv(1).empty()) {
55
PrintUsage(args, "<mapname> (layoutname)", "loads a new map");
56
return;
57
@@ -64,6 +64,12 @@ class MapCmd: public Cmd::StaticCmd {
64
65
66
const std::string& mapName = args.Argv(1);
67
+
68
+ if (mapName.find_first_of("/\\") != mapName.npos) {
69
+ Print("Map name '%s' must not contain directory separators", mapName);
70
+ return;
71
+ }
72
73
// For non-legacy paks, a map named "foo" must be in the pak "map-foo"
74
std::string pakName;
75
0 commit comments