Browse Source

Remove object and function namespace from argument list

Lukas 6 years ago
parent
commit
90d460d9a4
1 changed files with 2 additions and 2 deletions
  1. 2 2
      Engine/source/console/codeInterpreter.cpp

+ 2 - 2
Engine/source/console/codeInterpreter.cpp

@@ -2082,7 +2082,7 @@ OPCodeReturn CodeInterpreter::op_callfunc(U32 &ip)
          mNSEntry = Namespace::global()->lookup(fnName);
 
       StringStackWrapper args(mCallArgc, mCallArgv);
-      cRetRes = CInterface::GetCInterface().CallFunction(fnNamespace, fnName, args.argv, args.argc, &cFunctionRes);
+      cRetRes = CInterface::CallFunction(fnNamespace, fnName, args.argv + 1, args.argc - 1, &cFunctionRes);
    }
    else if (callType == FuncCallExprNode::MethodCall)
    {
@@ -2115,7 +2115,7 @@ OPCodeReturn CodeInterpreter::op_callfunc(U32 &ip)
          mNSEntry = NULL;
 
       StringStackWrapper args(mCallArgc, mCallArgv);
-      cRetRes = CInterface::GetCInterface().CallMethod(gEvalState.thisObject, fnName, args.argv, args.argc, &cFunctionRes);
+      cRetRes = CInterface::CallMethod(gEvalState.thisObject, fnName, args.argv + 2, args.argc - 2, &cFunctionRes);
    }
    else // it's a ParentCall
    {