- fixed: argument count passed to the OSD system was +1 than it expected

This commit is contained in:
Rachael Alexanderson 2019-12-31 08:07:09 -05:00
parent 5ea5d87664
commit 143c8be84d

View file

@ -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(&param) != OSDCMD_OK)
{
Printf("%s\n", pszDesc);