From 143c8be84dd1e407f068f282eb1da0e0cfeb8524 Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Tue, 31 Dec 2019 08:07:09 -0500 Subject: [PATCH] - fixed: argument count passed to the OSD system was +1 than it expected --- source/common/console/c_dispatch.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/common/console/c_dispatch.cpp b/source/common/console/c_dispatch.cpp index 342bd7a31..ca4ff695a 100644 --- a/source/common/console/c_dispatch.cpp +++ b/source/common/console/c_dispatch.cpp @@ -1044,7 +1044,7 @@ int OSD_RegisterFunction(const char* pszName, const char* pszDesc, int (*func)(o auto callback = [nname, pszDesc, func](FCommandLine& args, void *, int key) { if (args.argc() > 0) args.operator[](0); - osdfuncparm_t param = { args.argc(), nname.GetChars(), (const char**)args._argv + 1, args.cmd }; + osdfuncparm_t param = { args.argc() - 1, nname.GetChars(), (const char**)args._argv + 1, args.cmd }; if (func(¶m) != OSDCMD_OK) { Printf("%s\n", pszDesc);