aboutsummaryrefslogtreecommitdiff
path: root/primedev
diff options
context:
space:
mode:
Diffstat (limited to 'primedev')
-rw-r--r--primedev/util/printmaps.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/primedev/util/printmaps.cpp b/primedev/util/printmaps.cpp
index 906bed06..28325db9 100644
--- a/primedev/util/printmaps.cpp
+++ b/primedev/util/printmaps.cpp
@@ -200,7 +200,13 @@ AUTOHOOK(Host_Map_f, engine.dll + 0x15B340, void, __fastcall, (const CCommand& a
{
RefreshMapList();
- if (args.ArgC() > 1 &&
+ if (args.ArgC() > 2)
+ {
+ spdlog::warn("Map load failed: too many arguments provided");
+ return;
+ }
+ else if (
+ args.ArgC() == 2 &&
std::find_if(vMapList.begin(), vMapList.end(), [&](MapVPKInfo map) -> bool { return map.name == args.Arg(1); }) == vMapList.end())
{
spdlog::warn("Map load failed: {} not found or invalid", args.Arg(1));