aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDLL
diff options
context:
space:
mode:
Diffstat (limited to 'NorthstarDLL')
-rw-r--r--NorthstarDLL/mods/modmanager.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/NorthstarDLL/mods/modmanager.cpp b/NorthstarDLL/mods/modmanager.cpp
index 0f904bcd..8ac9ac54 100644
--- a/NorthstarDLL/mods/modmanager.cpp
+++ b/NorthstarDLL/mods/modmanager.cpp
@@ -303,11 +303,18 @@ template <ScriptContext context> auto ModConCommandCallback_Internal(std::string
{
if (g_pSquirrel<context>->m_pSQVM && g_pSquirrel<context>->m_pSQVM)
{
- std::vector<std::string> args;
- args.reserve(command.ArgC());
- for (int i = 1; i < command.ArgC(); i++)
- args.push_back(command.Arg(i));
- g_pSquirrel<context>->AsyncCall(name, args);
+ if (command.ArgC() == 1)
+ {
+ g_pSquirrel<context>->AsyncCall(name);
+ }
+ else
+ {
+ std::vector<std::string> args;
+ args.reserve(command.ArgC());
+ for (int i = 1; i < command.ArgC(); i++)
+ args.push_back(command.Arg(i));
+ g_pSquirrel<context>->AsyncCall(name, args);
+ }
}
else
{